I fixed the solution to this problem by following this method.
Manage Jenkins => Global Tool Configuration => Git -> Git installations.
Name: Default
Path to Git executable: C:\Program Files\Git\bin\git.exe
The problem was solved when I tried again by saying Save