setupDecompWorkspace failed applySourcePatches (Minecraft Forge)

I am trying to do Minecraft modding again like I used to do on the same computer. I am following the same tutorial that I used to, but all of a sudden, I get this error message after gradlew setupDecompWorkspace:

Execution failed for task ‘:applySourcePatches’. cannot be cast to org.gradle.api.file.FileCollection

I have no idea what went wrong. I used to do Minecraft modding on the same computer. Can anyone tell me what I should do or if I should post additional information? Any help would be appreciated. Thank you!

I am having the same issue here