How can this pool heater gas line be disconnected?
You are looking at a union, with an elbow to the left and a valve to the right.

Put one wrench on the biggest "nut". Put the other wrench on the smaller "nut" immediately to the right of it - you'll notice both of them are more worn than the other ones.

Hold the smaller one still while unscrewing the larger one.

Here's a cutaway view, if this image link works. From Grainger, no affiliation nor endorsement implied. Down on this image would be right on your image.