There are multiple scenarios for how you would measure distance and I would like to post some here in.
Scenario 1: If you know the GPS location of the two points.
This scenarios is best explained by the post from @Xiphware
Scenario 2: If the measurement is not based on the GPS coordinates but rather the respondents assessment
This is a most common case within the Water Sanitation and Hygiene (WASH) related studies. In this case you may have to use the means of transport and time taken to estimate the distance. Ideally what this does is that it takes a mentioned means of transport and the time it takes as provided in the example below
You would then use a conversion meter e,g. for the above we used the conversion
Ideally with this you can then create a conversion using a calculate question which outputs the distance covered.