I have found a temporary workaround for this issue.
Navigate to your 'ForgeVersion.json' which you can find under %userprofile%\.gradle\caches\minecraft\ (Windows)
In this file you need to replace a "0" underneath whichever version of Minecraft your mod uses, with the correct forge release version.
For example I am using MC 1.12.2-184.108.40.20614, so I end up with:
You can find out which version your mod needs in the build.gradle file.
Once you have done this set the ForgeVersion.json to read only,