Not specifically a-bodies but...

Can I take the engine out of a Jeep Cherokee (about 2005) and put it in my '98 Dodge Dakota?

My neighbor has a totalled Jeep and I have a Dakota with no engine. lol
One of needs to come out with a running something.