Leaky injectors is a big time fire hazard.
Take your battery to have it totally checked out at NAPA, or where ever you bought it.., should be a free test. Yours may just be a lemon. What amp settings have you used on your battery charger to charge battery, and for how long?
Try switching out your new TPS back to the old TPS.
You are certain that your ignition wires are absolutely in their correct positions, both on coil, and from coil to the correct plugs?
Clean your ground(S).
Check the wire connection to your CTS, coolant temperature sender located driver's side of block, which sends a signal to your ECU, (brain under dash).
You said you detected gasoline in your oil.., was that from a smell test of the oil on your dipstick? Anyway, flooding your the tops of your pistons with gasoline will leak down through the gaps of your rings, i.e., 'wash-down'. You will want to change your oil, and filter.
You said: "It would stay running more than 20 seconds at a time. Battery died before it cleared up".
I cannot understand what you meant, or possibly implied in the quote above. If your XJ idled for longer than 20 seconds, was it still acting like it was missing an active cylinder? =OR==> Did you mean it would NOT run more than 20 seconds at a time? I will stop trying to speculate, lol. Listen, write down some notes as you go through whatever you do, and keep us posted.:compwork: