This confused me for a moment -- I was thinking "well, there was this war, you see -- it was called WWII and we were going to invade Japan..." and then I realized that you are talking about Theodore Roosevelt and the "Great White Fleet." The basic reason why TR sent this fleet to Japan (and to many other places) is that he wanted to demonstrate American power to try to make Japan think twice about coming into conflict with the US.
The major reason for sending the fleet to Japan in particular is that the US was coming to see Japan as a potential enemy in the Pacific. TR thought Japan was an up and coming nation. They had defeated Russia just a year or so before TR dispatched the fleet and they were clearly going to be interested in having a sphere of influence in the Pacific. This worried TR to some extent because the US had interests in the Pacific as well -- China, the Philippines, Guam (the latter two of which were American possessions at the time).
So TR saw Japan as a potential threat and sent the Great White Fleet there (again, among other places) to try to show that the US had a lot of power and to try to convince Japan not to pick a fight with the US.