Both cars should have same gearbox ZF 4HP22, I suppose its possible that some of the connectors might be slightly different but the box itself should be the same both in your 3.6 and 3.2 auto.
1996, 3.2 SWB X300 - Relatively rust free daily driver!
1997, 4.0 LWB X300 - Unlucky car, sold 10.2020!.
1988, 3.6S XJS - Never ending restoration project.
1994, 3.2S X300 - Accident damaged, 10.2015. Gone!
1994, 3.2S XJ40 - First Jaaaag, long gone.