Oh, well...
I had the same error when I tried to install Forge for 1.14.
For me the reason was Java 14.
It didn't want to install it using v14 but the latest Java 8 is ok.
So, if you have smth later than Java 8, try to downgrade it.
Hope, this information is useful