Make sure the pilot burner is clean and has a good Large flame on the thermal couple.
If you can't get the pilot to stay lit with a new t couple and strong pilot flame it's probably a bad has valve.
I assume this is an older boiler and all rollout and safety switches are ok.