The thermostat is replaceable, the biggest hurdles are finding one, and getting the old one out. The whole thing threads into the tank. If you can find one locally, I suggest you have them hold it for you while you attempt the removal. Some places do not like to take parts like that back. If you can get it out and you do not find tank rot, then go for it. If you cannot get it out, then total replacement is your only option. Good Luck!