I had similar problems with my Allison M3060 6 speed transmission, (on 2 different occasions).
The first time it was a bad wire from the batteries to the Allison VIM, (vehicle interface module?)........
BTW, that repair cost me $1,500.00 at an "authorized" Allison shop!
The second time it was a bad relay
in that module, which I diagnosed and repaired myself for $6, (the cost of a new plug in relay).
Here is a link to a pic of the VIM: Allison Transmission VIM Relay Module: nwrvsupply.com
'96 Safari, 132k miles