All the Evangelists mention the cup which Jesus elected to drain to its last bitter drop. That cup, of course, comprised all the events of what we call "Passion Week," particularly His crucifixion.
While the disciples were arguing about which of them was the greatest, and who should get to sit on the right and the left of Jesus when He established His kingdom on earth, Jesus asked them,
"'Are you able to drink the cup that I am about to drink?' They said to Him, 'We are able'" (Matthew 20:22)
There is little doubt in my mind that the disciples (James and John, the sons of Zebedee) had no idea of what Jesus had in mind when He told them of the cup and the baptism that lay ahead.
In Mark, Jesus also referred to the excruciating death He would soon experience as a baptism:
"'You do not know what you are asking [when you ask to sit at my left and my right in my kingdom]. Are you able to drink the cup that I drink, or to be baptized with the baptism with which I am baptized?'" (10:38).
Furthermore, just prior to Passion Week, at the point where Jesus set His face as a flint, as it were, going to Jerusalem to be arrested and killed (see Isaiah 50:7 KJV, and Luke 9:51 KJV), Luke tells us
". . . when the time was come that he should be received up, he steadfastly set his face to go to Jerusalem" (my emphasis).
Notice that Luke tells us Jesus was not anticipating His crucifixion as much as He was anticipating His being "received up"; in other words, ascending into heaven! What does Hebrews tell us?
". . . who for the joy set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God" (12:2, my emphasis).
After saying to His Father three times "Your will be done," nothing was going to get in His way of completing the work His Father gave Him to do, not even His own very natural, human desire to bypass such intense suffering; again, only IF the Father were willing to take that cup from Him.
"'Nevertheless, not what I will, but what Thou wilt'" (see Mark 14:36 ff., and Matthew 26:39 ff.).
Evidently, however, Peter had the mistaken notion that physical violence could prevent Jesus from being arrested. His impulsive act of taking a sword and trying to kill someone with it was not Peter's first (or last!) bad decision. Peter was wrong, of course. Once Jesus was arrested, no power on earth could deflect Him from doing what He knew His Father required of Him. I believe that the matter was settled, in fact, in heaven from eternity past (see Ephesians 1:1; 3:11; 1 Peter 1:17-20; and Revelation 13:8 in the NIV), and it was simply confirmed in the Garden of Gethsemane (i.e., the Garden of the olive press!).
"'I have a baptism to undergo, and how distressed I am until it is accomplished'" (Luke 12:50).