Truck will not start. The GEN light came on when driving home and truck died. on 1996 Dodge Ram 2500

It took the truck about 1\2 hr to die after GEN light came on. Battery was bad and I replaced it. After replacing battery the engine turns over but will not start. I had the alternator tested and it passed. Tried checking for error codes but I get an error message on my handheld. Does that mean the ECM is bad?

Asked by for the 1996 Dodge Ram 2500