So I found the problem and its solution.
As the error suggests, I had an HTTP(S) proxy setup (in my case an app called “Freedom” was automatically setting one up). After removing the proxy from “System Preferences > Networks”, the build was proceeding.