Gas mileage and XJ for most do not go hand in hand, plus a large number of variables come into play when trying to get good mpg. One of my goals when building my truck was to maintain close to factory mileage. My DD is a 2001, auto, 231, 4.5 long arm, 31” tires, 4.56 gears (corrected speed o) and a couple hundred lbs of bumpers and a roof rack which never comes off. I get about 20 mpg mixed and 26 mpg highway.
During my research a came a cross a mathematical equation that will tell you were a particular engine is most efficient in my case that was 2450. So when selecting a gear ratio I took into account at what speed do I do most of my driving and then installed a gear set the will put it close to the 2450 rpm. At 2450 the truck is running a 70 mph at about ¼ throttle. Around town 30 mph or so about 1500 rpm at about 1/8 throttle.
Maintenance also plays a role what type of oil, how often is it changed, type of spark plugs how often are they changed, air filter again how often is it changed. Type of fuel used I use a 90 with 5% ethanol it has given me the best return.
Keep in mind you are driving around in a brick and if you have a lift you are driving a tall brick. Good mileage comes from looking a the whole package (in my case 4 variables were taken into account) and not just one thing, but I will say I believe gears play by far the largest roll in maintaining close to stock mpg.