Is energy always conserved?

To restate what others have said:
A one meter long packet of light begins its journey toward earth.  A million years later its wavelength has doubled (energy halved), and likewise its length has doubled (due to the expansion of space).  So the total energy of that packet of light striking the earth is the same as when it began its journey.  It is half as energetic, but there is twice as much of it.
Is this correct?