When you go to the App Store does it say 'Open', I bet it does.
The error you are experiencing is the App Store detecting a copy of the
Install macOS Mojave.app in your Applications folder.
Locate it, move it to the Trash, empty the Trash.
Connect your mac to your router rather than WiFi, restart your mac
open Safari, do not use Firefox and click on this link,
How to upgrade to macOS Mojave - Apple Support
Go to Section 4 and click on Get macOS Mojave,
you will be directed to the App Store Mojave page.
And this time it should say 'Get' or 'Download'.
Do not use the mac while it is downloading or any
other devices that share the same internet connection.
The file you download is perfectly safe