Psalm 22:20-21 is a desperate prayer for deliverance from the sword, the power of the dog, the lion, and the wild oxen. The sufferer has reached the point of greatest danger and entrusts his rescue entirely to God. The verses do not contain the exact words Jesus later speaks at His death.
Luke 23:46 records Jesus' final prayer, "Father, into your hands I commit my spirit," which directly quotes Psalm 31:5 rather than Psalm 22. The connection with Psalm 22:20-21 is therefore thematic: both express complete dependence upon God in the face of death. Jesus' final act is one of trust in the Father, corresponding to the underlying faith of Psalm 22's sufferer even amid apparent abandonment.