Here is just one problem with Japan buying Alaska instead of Canada or the United States.
America bought Alaska in 1867. During this same year, Canada had just Confederated but it was only this big.
Canada had only been in existence as a Dominion for a couple of months before Alaska was sold, and it never bordered Alaska during those times. It was limited to four Provinces: Ontario, Quebec, Nova Scotia, and New Brunswick (even Prince Edward Island chose not to join for a bit).
Within only four years though, Canada has expanded almost to its current size. It has added the North West Territories and British Columbia. Prince Edward Island joins within only two years after that. By 1873, it only lacks Newfoundland and the northern islands.
Finally, by 1881 Canada had completed its Pacific Railroad and added the northern islands to itself. As a consequence of all this, Canada and the United States inherited the old British-Russian border dispute.
While Britain never expressed an interest in buying Alaska, Canada would have jumped at the chance of buying Russian Alaska. It was willing to spend the money to expand, and part of its usual bargaining position was assuming the debts that the colonies by themselves couldn't pay (both British Columbia and PEI experience financial difficulties before entering Confederation) and Canada did pay for the North West Territories.