can i use heat to get gland nut loose?
It might help if there is loctite on it. If it has a nylok nut it will melt the nylok and you will need a new nut. What size nut on what brand of cylinder?
A picture might help, some styles really benefit from peening. The main drawback is ruining plastic or rubber parts.
Heat is last option. Try the “peening” method, using a spanner wrench with a big ole bar behind it, or pipe wrench. Those have been my success stories, however I have used a bit of heat also at times.
Would really help to know what machine and what cylinder? Your question is too generic. Peening won't do anything on a cylinder with the gland nut threaded on the outside of the barrel. It's a gland nut and not a rod nut?
Seen one fellow tack welded a bar to nut whacked it with sledge hammer worked good.
We need to know what kind of gland nut?
A couple of images will help some as well as the type of cylinder and the machine itself.
Most JCBs have a pin under the wide band.
Pictures help alot.