No one knows for certain how long the Temple of the Ancients has stood, which is hardly a surprise. Much of the history of Rakata Prime‒and that of its one-time conquerors who placed the galaxy into servitude‒has remained undiscovered. What is known of the temple is its relatively recent history.
A tribe of Rakata known as the Elders had charged themselves with guarding the temple from other tribes, even though their species no longer had the affinity with the Force required to enter their ancestors' hallowed repository. The Elders held that the temple's secrets must be too important to fall into less civilized hands than theirs. It was this tribe that allowed the Jedi Revan to enter the temple and learn how to destroy the corrupted Rakata superweapon known as the Star Forge. It's unclear what has happened to the tribe in the three hundred years since then as the Temple of the Ancients is no longer under their protection.