Then you could solve it like that.
from geopy.distance import vincenty
from shapely.geometry import LineString, Point, LinearRing
loc = (28.469723, 77.065292)
routePoints = [(28.478324, 77.093916), (28.471647, 77.092457), (28.465498, 77.086105), (28.461273, 77.077651)]
point = Point(loc)
route = LineString(routePoints)
pol_ext = LinearRing(route.coords)
d = pol_ext.project(point)
p = pol_ext.interpolate(d)
closest_point_coords = list(p.coords)[0]
distance = vincenty(closest_point_coords, loc).km
print(distance)
1.5303772782641438
The output is still the same because the point is accidentally the nearest, but by changing the point you will see that it finds a point on the line that is closest.