Truck will NOT start
1997 f250 2wd. The truck has been acting up. After a late night at my buddies I went to start it and the truck tried to crank but sounded almost as if it hydro locked and all electrics shut off. Tried to throw it on the charger at max power and it would not even light up. After sitting a little while interior lights came on but the truck would just click from one of the solenoids under the hood and also from the fuse box. We swapped in a marine battery and had the charger on it still nothing. Finally after about 2 hours it cranked over and started randomly. Drove it fine for a week until I went to go to school and the truck went to crank and just stopped, killing all electrics in the truck. Spent the day with my brother trying to figure it out. Batteries tested fine, alternator was new 15,000 ago, and a new starter in march. I checked the bolts to the starter and one was a little loose. Tightened it and still nothing. So I took the starter out cleaned it up bench tested it on the ground. Everything spun freely and fine. After we bolted it back up it did another half crank and was dead again. Then I tried one more time and it started. I drove for 2 more days before I stopped by my moms shop and it did the same thing AGAIN. I went to auto zone and they gave me a new starter under warranty and swapped that out with the old one and still no avail I am really stumped. With the charger on the truck just clicks rapidly coming from the starter. ANY ideas will be helpful!