He's been pretty consistent on his message about trade since his talk show appearances in the 80s. That is unheard of consistency for Trump, so I do believe he thinks he's doing the right thing here. The problem is its only a first order analysis.
He's likely thinking the military is powerful enough to function without help from allies, but ships need to refuel somewhere.