Matter is not eternal. Energy is not eternal. God trancends matter and energy. He is all powerful.
“For the invisible things of him from the creation of the world are clearly seen, being understood by the things that are made, even his eternal power and Godhead; so that they are without excuse:”