We have run into this every once in a while. The likely problem is the idle speed motor or IAC. It fails in a certain position and the engine computer(PCM) can't regulate the engine speed. It is relatively easy to replace, it is located on the back side of the throttle body and held in with a couple of Torx head screws.
Disconnect the battery, replace the IAC and reconnect the battery. It may learn the idle right away or take a little while. Now this is the more common issue. I would also make sure your battery is in good condition. A weak or failing battery can cause the memory of the PCM to reset so it forgets the idle setting.
Good luck with this and let me know how it turns out.
Dodge Technician
19 years as Technician, 14 years with Chrysler Group LLC
this truck recently had body work could that have affected anything
Without knowing what was done I really can't say. I'm sure if any welding was done they disconnected the battery before performing the repair.
It is a common issue with the IAC to failure without any prior warning.