Conservatively, there's enough heat down there for the current world's energy use for 17 billion years:
https://www.wired.com/story/how-long-will-earths-geothermal-...
Considering our sun will explode in 5.5 billion years, that should be good enough.