2001 Dodge Ram V6 Automatic won't start

Started it this morning and drove to the store 5 minutes away wtih no problems. When I came out 10 minutes later, truck would not turn over. Tried a jump start with no luck. Pumped the gas pedal and got it to start but it would die if I took foot off gas. Finally got it turned over it and kept engine revving at 1500-2000rpm while in park for about 15 minutes and then it would idle and drive fine. If I took my foot off gas before that however, the truck would die again. Truck started the rest of the day, but now every morning I have to repeat this process to get the thing started. Any ideas what this could be or what can be done to fix it? It has been pretty cold lately, maybe that has something to do with it? Any help is appreciated.