AMC engine swap?

If the 232 or 258 in the gremlin will turn over it will run.
They are the slant six of AMC.
I am pretty sure they were actually produced for alot more years than the slant six.
I drive a 4.0 in my daily driver jeep.