Welcome to Dieselplace!
First and foremost, how are your battery cables? If they are corroded, loose or anything that can cause this issue. My truck did the same thing with a new starter and batteries. All I did was clean my cable ends and made sure they were tight and it hasn't done it since.
Also, please tell me you installed the bracket on the front of the starter? It's a small angled metal bracket that goes from the starter to the side of the engine block. VERY important this is installed or it can cause the starter to break starter bolts, ruin flywheel/flexplate teeth, or worse, crack the block.
Next question, was the truck running before you replaced this stuff? Or did you assume it won't start because of these items? Have you tried to turn the motor by hand?