I am on MacBook Pro using High Sierra (10.13.4)
My installed version of Xcode is 8.2 (8C38) and I am trying to update to 9.3.1 but I end up in endless waiting.
it turns out that
(a) Newest XCode (9.3.1) required High Sierra MacOS
(b) And even you upgrade to HighSierra, you still have the same issue
So, I did following to resolve this
I updated my OS from El Capitan to High Sierra as I found out that in order to get latest XCode v. 9.3.1, you need High Sierra - this went smothless
Once updated to High Sierra, I went to app launcher and uninstalled XCode,
Next, I went to this link https://developer.apple.com/download/more/ and downloaded XCode 9.3.1 xip file
Once downloaded, unzip it using Archiver app
Once unzipped, just drag the XCode app to Applications folder
Start it to complete installation
Maybe @Apple should talk to their QA