Questions & Answers about La farmacia está a un kilómetro de mi casa.
Here a means something like at a distance of or away by.
So:
This is a very common Spanish pattern for distance:
English does not use at in the same way here, so this often feels unusual to learners.