'01 Outback not cranking

I was wakeboarding the other day and everything was working fine I shut the engine off and then tried to turn it back on it initially tried to turn the engine and then it quit. When I tried to start it again it doesn\\\'t turn the engine at all and just makes a spinning sound. I have since taken the starter and soleniod off and had it tested at AutoZone. They told me that the starter was a little rough but was working properly. I just bought the boat and the previous owner just had the solenoid replaced. I am not sure what the problem is, I was hoping it was the starter or solenoid but according to AutoZone it is working fine. Any ideas on what you think it is and a suggestion is appreciated.