To replace the thermocouple, be sure to turn off the shutoff valve in the gas line; that is, one quarter turn so that the handle is at a right angle to the pipe. Since working room is tight around the burner, we recommend that you simply unscrew the three nuts at the control valve and pull out the entire burner assembly unit. You’ll see either a slot or clips that hold it in its place. Then either unscrew the thermocouple end or pull it out (depending on the water heater) and take it with you to hardware store to find a match. Position it exactly the same way as the old one. The pilot flame should wrap around the thermocouple bulb.
To reattach the three lines to the gas valve, thread the nuts into place with your fingers and hand-tighten them properly. Then snug them up with a quarter to half revolution with a wrench. The metals are soft, so don’t over tighten as they will break.
Be sure to test for gas leaks. You must have the pilot lit and the burner on for this test so that gas is flowing through the large tube on the system. Reopen the shutoff valve, relight the pilot, then turn the control valve to the “on” position. When the gas burner is on, use a 50/50 dish soap/water mix to test the screw joints for air bubbles that indicate leaks.