I am using Jira Trigger plugin with jenkins to trigger a jenkins job whenever Jira issue moves to "In Progress". I am passing some fields values of jira issue such as "issue key" and "Ant Method" (this is custom field) to jenkins.
Below is my jenkins job configuration
This project is parameterized there are two string parameter antmethod and issueid
Build when an issue is updated in JIRA

issueid parameter receives value of JIRA issue key and antmethod receives value of custom field from JIRA. I am trying to print those values in console log.
Above settings works in Jenkins freestyle project i.e. I am able to get jira issue key value and custom field value and print it on console but does not work in jenkins pipeline project
Freestyle project and Pipeline project are identical to each other except for the part of build step execution. In freestyle project I used "Windows batch command" as a build step in which I am printing JIRA issue key and custom field value in console (it is working).
In Pipeline project I have written a groovy script which prints values of parameters but for some reason I am not receiving values of Jira field in pipeline project.
Can somebody please help, what am I missing here with respect to pipeline project
Edit 1 - below is groovy script (It executes without any error but I am not receiving values from JIRA)

Edit 1:
When I click on build number in Jenkins I am navigated to build details, on the page I can see "Parameters" field, when I see the parameter I can see that Jenkins is receiving values from JIRA but those values can not be printed on console log with echo "value of ant method is ${antmethod} when I run the build from jenkins and provide input parameter while running I can see that those values are printed on console log but when values are received from JIRA then those are not getting printed on console log.
Can anybody please help me here, what am I missing in terms of accessing parameters values.

I was able to print input parameter values on console by using input parameter such as "params.inputParameter" for example if I want to print value of "ant method" then script should be
echo "value of ant method is : ${params.antmethod}"