This is a very different question, more for CoreLocation area.
So, you should close this thread and start a new one.
But a quick answer:
Just import CoreLocation and use:
let loc1 = CLLocation(latitude: 81.108187, longitude: 37.075812)
// Or : let loc1 = CLLocation(places[0].lattitude, places[0].longitude)
let loc2 = CLLocation(latitude: 31.076187, longitude: 87.000563)
// Or : let loc2 = CLLocation(places[1].lattitude, places[1].longitude)
let loc3 = CLLocation(latitude: 31.096688, longitude: 26.991312)
// Or : let loc3 = CLLocation(places[2].lattitude, places[2].longitude)
let dist1_2 = loc2.distance(from: loc1) / 1000 // In km
let dist2_3 = loc3.distance(from: loc2) / 1000 // In km
print("dist1_2 =", dist1_2, "km")
print("dist2_3 =", dist2_3, "km")
You will get:
dist1_2 = 5953.932994696864 km
dist2_3 = 5650.435157084044 km
Note: you'd better rename lattitude into latitude