I don’t think I can help here. Never had such problems.
I would suspect some port connection issue deep down in you system. When you start a build, there are at least two JVM processes involved (client and daemon) and maybe they have some problem communicating.
Maybe if you search the gradle issues and forum for such problems you can find hints.