I did something similar...97 guys, wiring, PCM, 4.0 and vin on a 99 2.4 frame and tub.
Done right it's not an issue.
Done wrong...and you're where you're at...
My guess is you have a mishmash of wiring. I'd download the FSMs for both model years and start sampling wiring colors... mostly concerned with what year the engine harness is, what year the dash harness is, and taillight harness.
You might want to send your PCM to @Wranglerfix wranglerfix.com for testing and to identify the year. It's fine if it's a 97 as long as it's all 97.
-Mac
99 was the start of the neon motor?