If you suspect that the head gasket is blown, remove the spark plugs, use a pressure tester to pressurize the cooling system, wait a few munutes, and crank the engine over. If coolant is getting into the cylinders, it will spray out of the affected cylinder/s when you crank it over.

If you don't find coolant in the cylinders, check the compression, usually 120-140 PSI is normal.

'99 TJ's will set misfire code/s and set the check engine light on. Check for codes with a scan tool to find out where the problem is if the light is coming on. Some TJ's will allow you to pull codes by cycling the ignition key from Off to Run three times, leaving it in Run the last time. The codes will appear in the odometer. Misfire codes are in the P0300 range.

As Sunder wrote, replacing the spark plugs with factory type plugs is a good idea, and I would add that the cap, rotor and wire set should be changed if they are over 5 years old, or have over 60k miles on them. Any corrosion inside the wire connectors warrants immediate replacement. Lastly, the coil is a common source of failure, too. Having one in the Jeep as a trail spare is a good idea!