If you suspect your thermocouple is not working correctly try the steps below before replacing it:
1.) Locate the pilot assembly and find the thermocouple. (Normally, the tip of the thermocouple touches the pilot light).
2.) Using a wrench, remove the thermocouple from the gas valve.
3.) Detach the thermocouple from the pilot assembly (Some thermocouples can be pulled free, others may require screws to be removed with a screwdriver first).
4.) Gently scrub the thermocouple with the abrasive side of a sponge or scouring pad to remove any soot/build-up (If you use steel wool, take extra care to avoid scratching the coating).
5.) Reattach the thermocouple to the pilot assembly and the gas valve.
6.) Turn the unit back on and test it to see if the pilot stays lit.