One thing you can try is to use this command like suggested by the Android
Known Issues web site page:
sysctl -w net.ipv4.tcp_window_scaling=0
Otherwise, if you are using a VM, it should be useful to set bridge mode for the Network, instead of NAT.
I had your same issue, but using repo sync -j1 I found that a project stuck while fetching. In my case was platform/prebuilts/sdk.
I solved by removing the folder .repo/prebuilts/sdk.git and downloading again the project from scratch without interruption. It seems that Git resume feature has some bug, at least for big projects.