The universe does not go on forever. There is an edge, and it is expanding at the speed of light. Energy density is slowly decreasing, and eventually the universe will become cold and dark, though not for many billions of years.