In fact, if the ancient Greek astronomers had the right idea of the heliocentric solar system model and put their minds to it they could have measured the Earth-Sun distance to fair accuracy just as was done in the 17th century by Jean Richer (1630--1696) and Giovanni Domenico Cassini (1625--1712) in 1672 (see Wikipedia: Astronomical unit: History). In fact moreover, if Eratosthenes (c.276--c.195 BCE), Archimedes (c.287--c.212 BCE) (arguably both greatest ancient Greek mathematician and experimentalist), Aristarchos of Samos (c.310--c.230 BCE) (the first heliocentric solar system), and Ktesibios (c.285--c.222 BCE) (another great experimentalist) had put their great brain together, they could have done it.
The angle φ between the zenith direction in Alexandria and a light ray from the Sun is equal to the angle between the radius to Alexandria and the radius to Syene by the converse of Euclid's parallel postulate (see also Euclidean parallelism axiom). The radius to Alexandria is a transversal that intersects 2 parallel straight lines.
φ/360=S/C , and so C = (360/φ)S = 50*5020 = 252000 stadia C = (252000 stadia) * [0.1577 km/(1 stadion)] ≅ 39700 km and r = C/(2π) ≅ 6320 km .where φ = 7.2° = 1/50 of a circle as measured by Eratosthenes, S is the arc length between Alexandria and Syene, C is the circumference of the Earth, and the Eratosthenian stadion = 0.1577 km (modern estimate).