I would assume the trans is going into "limp mode", but pretty sure that would give you 3rd gear but not totally sure, since certain years and models changed a bit. Limp mode occurs when the TCM finds a fault with the trans, wiring or sensors and it basically shuts down. The gear ranges you could get would probably be limited to what you could get with manual shifting. There are numerous things that can cause this problem and guessing would be difficult but I would suspect a trans input/output speed sensor is the culprit.
Anyway, what you probably need to start with is getting your Jeep scanned for codes. You are going to need a bigger/better scanner that has the ability to communicate with the trans control module (TCM). IF you pull codes from the PCM you might only find a P0700 which is an information DTC to tell you there is a stored fault code within the TCM.