Sort referral results by distance