I have found a solution. A few files in C:\Users"USER_NAME".gradle folder contains paths to libs with <USER_NAME>. I tried to replace “USER_NAME” to my user name, however it wasn’t succesfull. I decided change path to .gradle folder from C:\Users<USER_NAME>.gradle to D:.gradle, download libs on PC-1 and then move .gradle folder from PC-1 to PC-2. On PC-2 I launch folowing command:
gradle myTask --gradle-user-home D:\.gradle --offline
and it worked. In order to change gradle folder on PC-1 you have to use the following command:
gradle --gradle-user-home D:\.gradle --offline