Actually, this accords very well with the doctrine of substitutionary atonement.
In John 18, in the Garden,
Jesus said to Peter, “Put your sword back into its sheath. Am I not to drink the cup that the Father has given me?”Jesus had already prayed that God would take the cup away from him, but by the time he was arrested, Jesus knew God would not.
But what is that cup he refers to? It is not the cup of wine in Communion - the Lord's Supper was already in the past. So that cup does not refer to Jesus' blood.
There are two schools of thought about what that cup is. One is that it represents the fifth cup of the Passover, the cup of Elijah, which is not drunk during the Passover meal but symbolically placed at the table's center. It represents God's promise, that "I will bring you into the land."
That is an eschatological promise and so cannot be fulfilled except by the Messiah. And so Jesus understood he was personally its fulfillment, but the means of fulfillment was filled with dread.
The other understanding is that this cup is the cup of God’s wrath upon sinful humanity. A "cup" is used as a symbol of God’s wrath several times in the Jewish Scriptures (Jeremiah 25:15-16; Isaiah 51:17, 22; Lamentations 4:21; Ezekiel 23:28-34; Habakkuk 2:16). It is likewise used as a symbol for enduring God’s wrath in Revelation 14:9-10 and 16:19.
Here, when Jesus said on the cross, "Tetelestai" ("It is finished") Jesus was saying he had himself consumed all the wrath of God. He had drunk all the cup of God's wrath that should be poured on humankind, but was no longer. "It is finished" - all the work of Christ on the earth was completed and the salvation of humanity was now accomplished. And so he could say, "Into your hands I commend my Spirit."
All the wrath of God would be buried with Jesus but it would not arise from the burial. It is gone forever. And that is the response of God to all the wrath humanity has poured out upon him and the Son, and one another. It is not poured back onto us but was destroyed on the cross and buried in the earth, for wrath has no place in the eternal presence of God.