Why won’t the pilot light stay lit?
It could be a blocked gas line that is not allowing enought fuel to come to your pilot light. If pool heaters do not get sufficient fuel supply, they will not light properly. You will need to have a professional clean your gas source.