Java – I need to create an application with distance calculation between two sites. I do not know which API to use

The application must be able to access the current location and the user must select a specific point on the map. From certain distances of the colon, a number must be displayed on the screen of the app after certain calculations.
In the mathematical part that I already know, all I have to do is know how to get latitude and longitude from the places where the user is located and the point the user chose. I would like to know what to use. I've already tried Android Studio and Ioic, but I did not understand much and therefore came here.