Hey there, JohnDoe8,
Thanks so much for using Apple Support Communities.
We want to help you get Xcode downloaded so you can start writing some great code. There is a great article with more information on what you can do in situations just like this right here: If you can't download or update apps on your Mac. That article will have the best steps to start with and often resolve most issues of this nature.
If you're still stuck after trying those steps, if you're still stuck, you can try the following:
- Double check that your date and time are set correctly. You can do this by clicking the Apple menu > System Settings, click General in the sidebar, then click Date & Time on the right. This has had positive results in the past and is worth checking into.
- Log out of the App Store and back in. You can open the App Store and click Store > Sign Out in the menu bar to do this. Refreshing your connection can help resolve odd issues such as this one.
We hope this does the trick for you!
Cheers.