The temple you're likely thinking of is Luxor Temple. It's located on the east bank of the Nile River in Luxor, Egypt.
While the exact distance can vary slightly depending on the specific point of measurement in Giza, Luxor Temple is indeed roughly 310 miles southeast of Giza.