Both oil pans share the same gasket. Oil Pan gasket is the same for 1972 CJ with 258cid to the 2004 TJ 4.0L.
258 oil pan 1972 thru 1990 (CJ/ YJ Wrangler)
4.0L oil pan 1987 (XJ cherokee) thru 2004 (TJ Wrangler)
All of these years span AMC => Chevy => Chrysler (1987+)
The 258 oil screen can fit the 4.0L oil pump allowing the 258 pan to be installed on the 4.0L.
Oil pumps on both engines are the same in all ways including bolting location.