Jesus was perfectly fulfilling God's will when He went to the cross. Sometimes it is God's will for us to go through suffering so that we can become more like Jesus.
Yet it was the Lord’s will to crush him and cause him to suffer, and though the Lord makes his life an offering for sin, he will see his offspring and prolong his days, and the will of the Lord will prosper in his hand.