$PATH environment is not correct

in localhost

[root@drone ~]# echo $PATH
/root/.sdkman/candidates/gradle/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@drone ~]#
[root@drone ~]# which gradle
/root/.sdkman/candidates/gradle/current/bin/gradle

but in pipeline

+ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
+ which gradle
which: no gradle in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

i have restarted the drone server and drone exec runner service and also reinstalled.

the exec runner reads the PATH from the environment. If the PATH is incorrect it is because it is not being passed the correct PATH at runtime.