The distance calculation is based on Vincenty’s method of calculating the distance between two points on the surface of a spheroid, using the World Geodetic System (WGS84). The ICAO Doc 7910 (Location Indicators) is used as the basis for the aerodrome latitudes and longitudes.
The same method is used in ICAO's CERT tool, used for CORSIA carbon calculation.
Here below are some further references:
https://www.icao.int/environmental-protection/CORSIA/Pages/CERT.aspx
https://www.icao.int/safety/OPS/OPS-Tools/Pages/location-indicator.aspx
https://www.icao.int/Aviation-API-Data-Service/Pages/default.aspx