A 5 year old tank should of been under warranty and the repairs @ no cost to you.
In regards to your element switch out, Make sure you buy the same wattage element, same brand mfg.
Shut electric off, remove cover off of lower element access, take a electrical tester and check for current. "Make sure you set your testor to 240 volts or higher so it doesn't give a false reading/blow the fuse in tester.*
Take a hose and hook up to the boiler drain at the bottom of the tank, open it up and keep turning the valve on and off until you're not grinding the buildup anymore and you've established full flow. Once you have that running well, shut off the cold water inlet valve above, open some/all of the hot side faucets in the home and the hose should be allowing all the water to drain out of the tank.
Once the tank stops draining, physically shake the tank to determine if the boiler drain clogged up or it is actually empty; sometimes it will clog the drain and not fully empty the tank.
Once confirmed the tank is empty, proceed to remove the two wires attached to the element. Sometimes taking a digital picture if you are not sure of yourself in the matter is priceless. That new element will not always be stopped in the same direction as the last one. (I speak of this issue in regards to Kenmore water heaters with the use of a buss clip to burn @ 5500 watts and sometimes the wiring is stuck in position by the spray foam used between the outside covering and tank)
Use a element wrench to remove the old one, clean the threaded port into the tank to make sure the new one doesn't get a false tightening into the tank which would lead to leaks. Install the new one, hook the two wires back up, shut off the boiler drain at the bottom of the tank, turn the water back on to the water heater above and leave all the hot side valves in the house open until there is no sputtering of air coming out of all the faucets.
Once you know that the tank is full, shut off all hot side faucets in the home, check for leaks at the element. Wait a few minutes and if no leaks, turn the electric back on to the water heater and then replace the cover to the lower element on the tank.