Is it possible to use gradle with VPN app in MAC?

Hi,
I am trying to build Android app with gradle, while doing so I need to download dependencies from our office VPN network. To connect to our office network, we use VPN app in mac. If I connected to VPN, gradle build fails with below error.

Operation timed out (Connection timed out). If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

I do not configure proxy in project’s gradle.properties and global gradle.properties but gradle throws “java.net.ConnectException: Operation timed out”. If I turned off VPN app, other dependencies downloading as expected.

Gradle wrapper:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip

Is it possible to resolve the “Connection timed out” while connecting to VPN ? Is there any other changes to need to be done in my settings ?

Thanks in advance.