Unable to install Minecraft Java, error code 0x80131509
Open the Microsoft Store and make sure that you are signed in to your Microsoft account. Then, download all upgrades. The problem is not your Windows version but a component of Windows.
Taken from: MS Windows Forums
Even though you say your Windows is updated to the latest version, if you're getting the error 0x80131509 then it's highly likely you aren't running the latest Windows 10 build.
The latest build is version 1903 (OS Build 18362.175). Are you running this? To check, you can either type winver into the Windows search box or, hold down the Windows key and tap R on your keyboard. In the Run box, type winver and press enter.
If you're not running Windows version 1903 try this:
Try running Windows update from Windows Settings → Update and Security.
If that doesn't work, you can update via the Windows Media Creation Tool.
Download the Tool and save it somewhere like your Windows Desktop. Double click on program to run it. Choose 'Upgrade this PC now' and follow the onscreen instructions.
Mojang's Official Support Twitter has made a post (or rather retweeted one by their status account) about issues with Java users that own Game Pass not being able to use the game:
We’re aware that Game Pass members cannot yet access Minecraft Java Edition! We’re working on getting a resolution in place and will update soon.
From I've researched, they released a new launcher and it seems to have some issues on their end. You will have to wait for them to release a fix unfortunately. The Mojang Status account made a post saying it should be fixed, but it does not appear to be for a number of uses (see twitter replies chain).