Confirm voltage at the solenoids first. If voltage looks good, then disconnect the solenoids and put 12v to each one from a battery. With no other noises happening, you will be able to hear the solenoids clicking. If it is the solenoids, you can replace them for $80 or so.
I should add that if the solenoids do work, I was able to make hot water on one trip by using a long jumper wire to activate the solenoids and using a lighter to ignite the burner. Not entirely safe and I had to monitor the water temp. at the pressure release, but I made it through the trip and repaired the solenoids later.
Jose