Jesus commanded Peter, “Put your sword away! Shall I not drink the cup the Father has given me?”
Peter should not have been wielding any weapon at all, but the sword he exercised was the wrong weapon even if he was supposed to use one (Eph 6:17, 2 Cor 10:4, Heb 4:12). Peter would later learn how much more powerful are the things of the Spirit than a little sword that only cuts off an ear (Acts 5:1-10). Jesus mildly rebuked Peter, by telling him to quit doing what he was doing.
Ephesians 6:17 Take the helmet of salvation and the sword of the Spirit, which is the word of God.
2 Corinthians 10:4 The weapons we fight with are not the weapons of the world. On the contrary, they have divine power to demolish strongholds.
Hebrews 4:12 For the word of God is living and active. Sharper than any double-edged sword, it penetrates even to dividing soul and spirit, joints and marrow; it judges the thoughts and attitudes of the heart.
Acts 5:1-10 Now a man named Ananias, together with his wife Sapphira, also sold a piece of property. With his wife’s full knowledge he kept back part of the money for himself, but brought the rest and put it at the apostles’ feet. Then Peter said, “Ananias, how is it that Satan has so filled your heart that you have lied to the Holy Spirit and have kept for yourself some of the money you received for the land? Didn’t it belong to you before it was sold? And after it was sold, wasn’t the money at your disposal? What made you think of doing such a thing? You have not lied to men but to God.” When Ananias heard this, he fell down and died. And great fear seized all who heard what had happened. Then the young men came forward, wrapped up his body, and carried him out and buried him. About three hours later his wife came in, not knowing what had happened.
Peter asked her, “Tell me, is this the price you and Ananias got for the land?” “Yes,” she said, “that is the price.” Peter said to her, “How could you agree to test the Spirit of the Lord? Look! The feet of the men who buried your husband are at the door, and they will carry you out also.” At that moment she fell down at his feet and died. Then the young men came in and, finding her dead, carried her out and buried her beside her husband.
The other 3 gospels all record the anguished prayers of Jesus in the garden and of His speaking of the cup He must drink (Matt 26:39, Mark 14:36, Luke 22:42) and John mentions it here. In the Old Testament the cup was often associated with suffering and the wrath of God (Psa 75:8, Isa 51:17, 22, Jer 25:15, Eze 23:31-33). Jesus will indeed drink of the cup of the wrath of God, but it won’t be for anything He has done — His experiencing God’s wrath will be our fault. Jesus will drink of that cup on the cross to pay for the sins we have committed.
Matthew 26:39 Going a little farther, he fell with his face to the ground and prayed, “My Father, if it is possible, may this cup be taken from me. Yet not as I will, but as you will.”
Mark 14:36 “Abba, Father,” he said, “everything is possible for you. Take this cup from me. Yet not what I will, but what you will.”
Luke 22:42 “Father, if you are willing, take this cup from me; yet not my will, but yours be done.”
Psalms 75:8 In the hand of the LORD is a cup full of foaming wine mixed with spices; he pours it out, and all the wicked of the earth drink it down to its very dregs.
Isaiah 51:17 Awake, awake! Rise up, O Jerusalem, you who have drunk from the hand of the LORD the cup of his wrath, you who have drained to its dregs the goblet that makes men stagger.
Isaiah 51:22 This is what your Sovereign LORD says, your God, who defends his people: “See, I have taken out of your hand the cup that made you stagger; from that cup, the goblet of my wrath, you will never drink again.
Jeremiah 25:15 This is what the LORD, the God of Israel, said to me: “Take from my hand this cup filled with the wine of my wrath and make all the nations to whom I send you drink it.
Ezekiel 23:31-33 You have gone the way of your sister; so I will put her cup into your hand. “This is what the Sovereign LORD says: “You will drink your sister’s cup, a cup large and deep; it will bring scorn and derision, for it holds so much. You will be filled with drunkenness and sorrow, the cup of ruin and desolation, the cup of your sister Samaria.