My 2002 360/auto Ram has done that exact thing on three different occasions and each and every time it was the battery cable. That paper thin strap that goes around the battery post cracked/rotted from corrosion resulting a bad connection so I would check all the cables/connections first since it's free to do. The first time it happened it left me stranded in the dark at work but a vise grip clamped tightly around that thin strap got me the 50 miles home.