Actually the method of detecting mineral deposits by mapping gravitational field is already in use since a long time!
The Eotvos pendulum (an instrument aka. Eotvos torsion balance) designed in 1888 started this kind of measurement. It was used commonly by the 1920s by geophysicist for mapping underground deposits by measuring the gradient of the gravitational field very precisely.
This instrument was deprecated later by even better tools for surveying.
The instrument was initially constructed for the experiment showing that inertial and gravitational mass are the same (well, linearly correlated) to a great precision:
https://en.wikipedia.org/wiki/E%C3%B6tv%C3%B6s_experiment
https://www.nature.com/articles/118406a0 (pretty useless link, but a famed periodical)
Detecting submarines is way harder, practically impossible. as others have already pointed out.