If you bought the water heater 5 years ago, there is a good chance that it is out of warranty. Some water heaters have a 1 year warranty, some a 5 year warranty, and others have a 10 year warranty.
What is the serial number on the water heater (this typically will have a date code in it to tell when it was made)? Some water heaters even state when the warranty expires on the label.
If the water heater was made, based on the week and month in serial number, over 5 years ago and you do not have a receipt showing you only purchased it 4 1/2 years ago, then you are stuck with replacing it at your cost if this only has a 5 year warranty.