That's assuming Spain can hold it until 1895 (the sale could bring about the war earlier) and the Japan can hold it. Unless you buttefly away the Monroe Doctrine (and I don't think an outright American victory in the War of 1812 would do that) it's unlikely Spain or Japan would be able to hold it against the USA.
If anything, an outright American victory in the War of 1812 (or any other point where it could take control of Canada theoretically) would
strengthen the concept of the Monroe doctrine. The United States, having effectively limited European presence in the Americas to small enclaves in the Caribbean and South America (and Alaska), would probably be quite suspicious of attempts by other European or Asian powers to establish a new foothold by buying Alaska and flooding it with settlers.
In any case, I don't think the Russians even reached out to Spain OTL. Certainly they had fairly good relations with the United States during the 19th century and there's no real reason for that to change merely because the United States controls Canada, so they're probably going to tap the United States first if and (more likely) when they decide to sell it. If the U.S. passes up the chance to buy Alaska,
then you might see them shopping it around to Spain or Japan, but given that IOTL public opinion was generally in favor of it and the treaty easily passed the Senate, it would be odd if the U.S. did.