Glad you solved the problem, I converted it to an answer, please view the solution.
It means that there are two Xcode on your Mac, please remove the Xcode in Downloads folder, and open Xcode, go to Settings->Locations->Command Line Tools, and check if you select the right path.