Possibly a fowled thermocouple if the thermocouple doesn's sense the pilot flame then it will not send a signal to the gas valve telling it that its okay to open cause the pilot is lit.
If pilot lite lights & impinges properly on thermocouple so as to heat up the thermocouple, try lightly sanding rust off of thermocouple and then see if heater turns on. make sure pilot flame touches & heats up thermocouple. if the heater does not turn on, replace with new thermocouple proper for your make & model of heater.
Answers & Comments
Possibly a fowled thermocouple if the thermocouple doesn's sense the pilot flame then it will not send a signal to the gas valve telling it that its okay to open cause the pilot is lit.
If pilot lite lights & impinges properly on thermocouple so as to heat up the thermocouple, try lightly sanding rust off of thermocouple and then see if heater turns on.
make sure pilot flame touches & heats up thermocouple.
if the heater does not turn on, replace with new thermocouple proper for your make & model of heater.