There is same questions about what has to be done when the water heater pilot is falling, the burner is not working anymore or the tmp valve is not closing anymore. Do you need only to do the repair or change the whole unit? The way what i recommend is to change the unit. The new ones are more efficient, new warranty, energy saving, and more than that you are safe. It is possible to change the burner, the thermocuple , the tmp valve.
Don't forget all the manufactures recommend to change the anode rod every 3 years and every year tune up the water heater.
In last few months i saw units older than 15-20 years which i think is completely insane. The water heater should work properly as many years as warranty years the water heater has plus, if you change the anode rod every 3 years, one year/ anode rod change.And the space surrounding the water heater needs to be clean, empty of inflammable products.
Take this like a friendly advice.