You first mentioned TJ and XJ, now you're throwing in the YJ.
The TJ and XJ 4.0L throttle body in the '96+ jeeps are identical.
YJ throttle bodies are different as they don't have the vacuum port for the attached MAP sensor. The YJ's MAP sensor is on the firewall.