why it stalls when it idles or when it is put in park on 2002 Dodge Durango

about a month ago it started stalling when i would stop at red lights. some days it would stall and some days it ran just fine. This week it has started to just shut off when i out it in park a few times and still stalls when it is idling. What could the problem be?

Asked by for the 2002 Dodge Durango
have the battery and charging system checked.
The butterfly seal/lip could be fouled. Take of the breather cover (between air filter and metal throat connection) and clean inside an out of the butterfly itself, and the throat of the intake. B-12 (or any carb' cleaner), and a lint free rag (shop towel) will be good enough, A flat blade screw driver, and a 10mm socket are necessary (on mine anyway) to remove the cover. Make sure to focus on the lip (very, very slight bump) where the butterfly seats against the throat, any filth there is probably whats "mucking up" the idle, aka air mixture, and operation of the butterfly. Worked on an '02 Gov. surplus auction 4.7 that wouldn't stay running (idle <400rpm). It was raining (and hard) when performed but this allowed the engine to idle at 500-600 rpm, and I drove it off the property. Still 'purs' when at idle, and I suspect more "filth", and probably bad plugs. I will see when it stops raining, or the garage is cleaned out. I am hoping on sunshine first. Good luck.