According to Wikipedia: https://en.wikipedia.org/wiki/Xcode - the version of XCode running High Sierra 10.13.6 is version 9.4.1.
I found the specific version on Apples developer website:
Xcode_9.4.1
https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip
Should be pretty straight forward after you've downloaded.
Unpack the .xip file
Install the program
And then you're done ! I managed to do so without any complications.