Generally with a domestic engine (if Dodge can still be called domestic) the answer is yes. The closer you stay to the vehicle year the less chance you have of a problem. You also are likely to be able to use more of the accessory parts that come with the replacement engine. Things like sensors, switches and manifolds. Staying with the same vehicle also gives you more reusable parts. To really get a good answer you would need to be specific about what year you want to use. Some of the ways you can find out for yourself are to contact a salvage yard because they have interchange guides and they can tell you if it will fit. A lot of times they can answer the question without looking it up because they do a lot of that kind of sales. If you want to figure it out for yourself then just take a good look at your block and the way it bolts in. Then do a visual comparison. On the Asian engines I learned the hard way that you have to be very careful. You can also go to your local machine shop and ask them. They get to be pretty good at knowing when the core engine parts (blocks, heads) change.
I am going thru the same thing right now. Today I pulled my old 5.9 and found my connecting rod(in pieces) and most of the piston in the bottom of the oil pan. Not really sure what year replacement engine I got. I noticed that the oil pan on the replacement only has a single sump as opposed to the double sump on the original. I did move over most of my sensors and the fuel rail/ injectors.
I do have a 2003 specific question. When I pulled the original engine, I forgot to undo the oil pressure sensor plug and pulled the wire out of the loom. My question is where does it go? I can't see any obvious place where it enters the wiring loom. Thanks