Can't update Xcode
Yes I always found updating Xcode from the App Store a painful experience.
Assuming you have an Apple ID*, you can bypass App Store and download it directly using this Apple Developer link and then find the version of Xcode you need.
As @Tetsujin says, also ensure you have an appropriate version of macOS to support the version of Xcode you are going to be running.
- What is the correct version of xcode for mojave 10.14.4
Note: * You no longer need a developer account, although you may want to consider this depending on the type of development you are going to be doing. See this Apple Developer page for details and links to create the appropriate account types. Note that you can start with a free Apple ID and upgrade later as necessary.
This can happen with any app if you have formerly downloaded the same app (i.e. With the same internal "bundle id") from outside the App Store.
Simply move the app to the Trash, restart the App Store app and try downloading the app again.
Trashing an app does never make you lose your settings or even project. This is not Windows (where Uninstallers are common - but even those often offer an option not to delete your data) ;)
In my case, I just had to upgrade to the latest macOS, since Xcode 7.3 requires El Capitan, just as Tetsujin pointed out.