Difficult to answer this without having the data to play with, something along these lines. The left join should mean that the original CTE result set stays the same and hopefully will just grab the first imageurl match it finds keeping the number of records the same.
with cte as (
SELECT
Distinct loc.name,
loc.latitude,
loc.longitude,
c.userid,
c.locationid,
c.time,
(SELECT Count(*) FROM tbl_likecheckin WHERE checkinid = c.id) AS TOTALCheckin,
(SELECT Count(*) FROM tbl_likecheckin WHERE userid = 57 AND checkinid = c.id) As Checkinflag,
CONVERT(DECIMAL(16,2),(dbo.Distancebetween(loc.latitude, loc.longitude, 22.302647, 73.190144)))
AS
Distance
FROM tblcheckin AS C
INNER JOIN tbluser AS u
ON c.userid = u.userid
INNER JOIN tblgetlocation AS loc
ON c.locationid = loc.venueid
WHERE c.flag = 'C'
and CONVERT(DECIMAL(16,4),(dbo.Distancebetween(loc.latitude, loc.longitude, 22.302647, 73.190144)))<=(select maxdistance from tblDistance)
)
select cte.name, cte.latitude, cte.longitude, cte.userid, cte.locationid, cte.[time], cte.Distance, imagetable.imageurl
from cte
left outer join (SELECT
Distinct
loc.name,
loc.imageurl,
FROM tblcheckin AS C
INNER JOIN tbluser AS u
ON c.userid = u.userid
INNER JOIN tblgetlocation AS loc
ON c.locationid = loc.venueid
WHERE c.flag = 'C'
and CONVERT(DECIMAL(16,4),(dbo.Distancebetween(loc.latitude, loc.longitude, 22.302647, 73.190144)))<=(select maxdistance from tblDistance)) imagetable
on cte.name = imagetable.name