I have tried hostname instead of IP and using password instead of key file but the result is the same.
With ssh on console I can connect without problem.
16:58:17.836 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':deploy'.
16:58:17.900 [DEBUG] [org.hidetake.groovy.ssh.session.Executor] Executing 1 session(s)
16:58:17.915 [DEBUG] [org.hidetake.groovy.ssh.connection.ConnectionManager] Establishing a connection to Remote raspberry [192.168.4.104:22]
16:58:18.022 [DEBUG] [org.hidetake.groovy.ssh.connection.ConnectionManager] Using known-hosts file: /Users/vista/.ssh/known_hosts
16:58:18.027 [DEBUG] [org.hidetake.groovy.ssh.connection.ConnectionManager] Establishing a connection to Remote raspberry [192.168.4.104:22]
16:58:18.034 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: Connecting to 192.168.4.104 port 22
16:58:18.049 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: Connection established
16:58:18.149 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: Remote version string: SSH-2.0-OpenSSH_6.7p1 Raspbian-5
16:58:18.149 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: Local version string: SSH-2.0-JSCH-0.1.52
16:58:18.150 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
16:58:18.615 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: aes256-ctr is not available.
16:58:18.616 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: aes192-ctr is not available.
16:58:18.616 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: aes256-cbc is not available.
16:58:18.616 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: aes192-cbc is not available.
16:58:18.617 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
16:58:18.714 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
16:58:18.719 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: SSH_MSG_KEXINIT sent
16:58:18.720 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: SSH_MSG_KEXINIT received
16:58:18.720 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
16:58:18.721 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256
16:58:18.721 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
16:58:18.721 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
16:58:18.721 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
16:58:18.722 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
16:58:18.722 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: none,[email protected]
16:58:18.722 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server: none,[email protected]
16:58:18.723 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server:
16:58:18.723 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server:
16:58:18.724 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
16:58:18.724 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
16:58:18.724 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
16:58:18.725 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
16:58:18.725 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
16:58:18.725 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
16:58:18.725 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: none
16:58:18.726 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client: none
16:58:18.726 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client:
16:58:18.726 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client:
16:58:18.727 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: server->client aes128-ctr hmac-sha1 none
16:58:18.727 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: kex: client->server aes128-ctr hmac-sha1 none
16:58:18.766 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: SSH_MSG_KEXDH_INIT sent
16:58:18.766 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: expecting SSH_MSG_KEXDH_REPLY
16:58:18.912 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: ssh_rsa_verify: signature true
16:58:18.914 [DEBUG] [org.hidetake.groovy.ssh.connection.JSchLogger] JSch: Disconnecting from 192.168.4.104 port 22
16:58:18.919 [DEBUG] [org.hidetake.groovy.ssh.connection.ConnectionManager] Waiting for pending operations
16:58:18.924 [DEBUG] [org.hidetake.groovy.ssh.connection.ConnectionManager] Finished all operations including background commands
16:58:18.926 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':deploy'
16:58:18.926 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :deploy FAILED