Isn’t that just the regular WP loop? Don’t think this is related to ACF, since as you say this distance-thing isn’t a custom field and ACF is made for working with those.
Not sure how you build this without seeing more code. But couldn’t you go something like $post->distance
?