Sort locations by distance