Home Improvement Questions? Ask a Handyman for Answers
It sounds like the thermocouple ( located near the pilot light is not working properly) check for physical damage , out of line with the pilot , broken wire , bent,
The pilot heats it up abd it opens the gas valve.
Look for loose wires at the gas valve also. The valve could be bad but it is more likely the thermocouple.'
You can find these parts on line just compare model numbers or dimensions.
I will be glad to answer any questions you may have.
This site should be helpful.