I know in my 2000 XJ and 2001 TJ, I had to enter the code using the radio preset buttons (numbered 1 to 5).
From the current manual:
Turn on power with the key (ON or ACC position), then turn on the radio.
CODE should appear on the display.
Enter the 4 digit code by pressing the appropriate preset buttons in sequence.
If an invalid code is entered, the radio will allow 2 more attempts. Once locked-up, the battery must remain connected and the radio left on (WAIT should be on the display) for approximately 30 mins, before CODE appears.
Hopefully it should be a similar procedure.
Just checked the older instrution manual and the waiting time is approx 2 hours!
Ivan