The lost key password can be found under the .gradle folder, the path be something like this:
.gradle\3.3\taskArtifacts\taskArtifacts.bin
I think 3.3 is the number of the gradle version, it may change in some cases. If the version is greater than 4.0 the path is actually different:
.gradle\4.1\taskHistory\taskHistory.bin
In any case, this are binary files, so they're full of unreadable data, but if you search for the string "signingConfig.storePassword" you'll find a lot of text, mine looked like:
<97>signingConfig.keyAlias^C<8a>MY_KEY_ALIAS<9c>signingConfig.storePassword^C<92>MY_STORE_PASSWORD<98>signingConfig.storeType^C<84>jks<9f>