A defective gas fireplace thermocouple will only allow your fireplace to start and will then quickly stop. It probably won't function for more than five minutes – probably far less. To verify your diagnosis, pull out the thermocouple valve wire from its connectors, clean and reinsert it. If it continues its start-stop-start-stop cycle, then you will need a new thermocouple valve. All you have to do is pick up a new thermocouple device and insert it in the correct spot and you're ready to go as the fireplace will come on and stay on. The insertion procedure is spelled out in the documentation that comes with the replacement unit.