You are now talking about gravitational PE in general terms, that is, the energy required to bring a mass from infinity to a point in a field. This is correct. Your original question was specifically about the Earth and Moon system. That's what I was replying to.
Potential energy is a catch all term for energy stored. It can be in a spring when stretched, for example. In our case it is in a gravitational field.
The energy is stored (as GPE) when you move an object in the field and do work on it.
The work you do is stored as GPE.
When you lift an object up on the Earth's surface you have to do work on it. (Apply a force through a distance)
The work you do is stored as GPE in that object.
If you allow the object to fall, that GPH is converted into kinetic energy.
In the case of the earth and Moon you have to imagine them being pulled apart - this requires energy. This is purely in the imagination, but however you do it, you need a force and it acts through a distance. This work, to separate the the 2, becomes the GPE.
If the 2 objects then, under gravity, come back together, this GPE is converted into kinetic energy.
The general definition of GPE takes infinity as its starting point and says that the GPE an object has is the energy required (work done) bringing another mass from infinity to that point. The 2 definitions amount to the same thing.
The difficulty here was in starting from the Earth Moon system.
If you use the general definition you first calculate the energy required (work done) to bring the Moon from infinity to wherever it is near the earth, and compare that with the energy required to bring it from there to a point where it coincides with the earth. (The 2 centres are together. Impossible in reality.)
The difference between those 2 is the answer you got with your initial calculation.