Have you checked the computer to make sure there is only one version of the game on there? That means no other install files also you cannot have the Windows App version of the game and the Desktop version of the game on the same device, otherwise this type of error message will always happen.
If you have only one version then uninstall completely and install the latest version from this link.
https://education.minecraft.net/get-started/dow...
Click on "Download Windows Store Version"