This works fine in 1.20 but not in 1.21. I'm betting it's a regression due to changes made for
Set the script parameters to a value with a "/" in it. Then run the job, and in the logs you'll see the parameter has it's "/"s changed into "\"s which causes problems.
For example, set the script parameter to as show in the attached screenshot groovy-forwardslash-becomes-backslash.png:
and you'll get output like this in the job console:
[workspace] $ C:\jenkins\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_latest_\bin\groovy.bat C:\jenkins\jobs\deploy-marketing-to-FIT2\workspace\deploy\waitForUrl.groovy https:\\mfds1apf22:9443\pagetemplates\index
Caught: java.lang.IllegalArgumentException: protocol = https host = null
java.lang.IllegalArgumentException: protocol = https host = null
Build step 'Execute Groovy script' marked build as failure