Ok, with an electronic auto trans the first thing to do AFTER checking fluid level and condition is to determine if the problem is electrical or hydraulic/mechanical in nature.
You didn't share much info, so the TCU--transmission control unit--is under the dash, either on the passenger's side for earlier XJs or driver's side for the later XJs. Silver box, simply unplug it and drive the vehicle shifting manually.
Shifting manually you should have 1st in 1-2; 3rd in 3; 4th in D; reverse, neutral, and park. If you have that, then your trouble is electrical.
Things to check electrical, in order of ease:
1. Adjust the throttle pressure cable:
http://naxja.org/forum/showthread.php?t=1015963
2. Check the ground and reference voltage to the TPS, then check the output voltage of the TPS--needs to be 83 percent of the reference voltage. 87-90 are adjustable, 91 plus are not and must be replaced if out of spec.
3. There are two fuses, one is 7.5 amp and not the problem; the other is a 10 amp fuse that can be the problem. On the earlier XJs the 10 amp fuse is in a yellow wire close to the TCU; later XJs it in the PDC under the hood.
4. Test the solenoids--see the link I included in one of the earlier posts, you will need an ohm meter.
5. Test the wires between the solenoids and the TCU.
Post up what you find.