2003 2500hd duramax put new ecu in truck and in engine fuse box sometimes it stops cranking when trying to start turn key again an starts happening more often now.
What was the reason for replacing the ECU and the fuse box ?
Sounds to Me like a bad ignition switch, or, relay, or a bad connection in the start circuit.
Physically remove all fasteners holding down the ground wires and scrub and clean those surfaces until they are bright and shiny, and, while the negative battery cable is disconnected, do the same to all the connections on the positive side of the battery.
Fuse boxes are VERY common on those trucks. I would put a headlamp bulb ( better then a test light) on the s terminal of the starter and see if its dropping out when it stops cranking. That will narrow down a problem with the starter its self. If its loosing signal to the S terminal, work you way backwards through the system until you find was causing it. The Park/neutral safety switch on the trans could be the problem too, so I would check for constant power in crank at the PCM C1 connector pin 33. Also if you have a scanner you can watch the crank request PID to see if the PCM is being told to stop engaging the starter relay.