Let's separate out a couple of things here.
First, as far as energy in the sense of "doing work" is concerned, the Earth is doing no work and thus needs no energy, to keep the mass at rest on its surface. So, keeping it there forever is not an infinite amount of energy.
This brings us on to "for ever", and infinity. These are always terms which need to be treated carefully in physics. (There have been a couple of threads on this here recently).
The Earth has mass, but not an infinite amount, and this mass distorts space-time, but not by an infinite amount. So I don't see where the idea of an infinite amount of energy comes from. If you ask whether this lasts "for ever", that is another matter, and you are asking if the universe lasts for ever. Even if it does, it does not imply that the Earth is doing, or going to do, an infinite amount of work; and therefore doesn't need (or posses) an infinite amount of energy