Japan would then have a whole bunch of non-interest-bearing US dollars and the Fed would have a lot of interest-bearing US bonds.
Now it's true that Japan's treasury could then use those dollars to buy something else like stock in US companies but they could have done that all along anyway. They bought the debt for the coupon payments.
What's actually happening here is what it looks like: Japan's economy is starting to seize up due to the Iran war. Since they have to import all their oil they're suffering from a currency crisis (they can't export enough to balance payments on their oil bills). The US is stepping in to support them because 1) Japan's current government is allied politically with Trump and 2) Japan's an important geopolitical ally that is being hit very hard by the Iran war.