Jesus was talking about neither all Israel nor the Roman soldiers. He was talking about those Jews who had Him put to death by means of the Roman soldiers. Later, under the instructions of Peter, these very Jews repented and were forgiven. That's when Jesus' prayer to the Father to forgive them, was answered. True forgiveness is always a response to repentance.
On another occasion, Jesus said, "Watch yourselves! If your brother sins against you, rebuke him; and
if he repents, forgive him, and if he sins against you seven times in the day, and turns to you seven times, saying, ‘I repent,’ you must forgive him.” (Luke 17:3,4)
So now you may ask, when did those Jews repent? The ones who had Jesus put to death? Here is what Peter said to them:
“Men of Israel, hear these words: Jesus of Nazareth, a man attested to you by God with mighty works and wonders and signs that God did through him in your midst, as you yourselves know—this Jesus, delivered up according to the definite plan and foreknowledge of God, you crucified and killed by the hands of lawless men!" (Acts 2:22)
Then he said some other important things to them, including the fact that God raised Jesus from the dead.
He concluded his speech with these words:
"Let all the house of Israel therefore know for certain that God has made him both Lord and Messiah, this Jesus whom you crucified.” (Verse 36)
How did Peter's hearers respond to this? They were deeply convicted for having had their Messiah put to death.
Now when they heard this they were cut to the heart, and said to Peter and the rest of the apostles, “Brothers, what shall we do?” (Verse 37)
And here is what Peter told them to do:
“Repent and be baptized every one of you in the name of Jesus Christ for the forgiveness [or 'forsaking'] of your sins, and you will receive the gift of the Holy Spirit." (Verse 38)
How many of them took this advice? About 3000 of them. And they were added to the Assembly of Disciples. (Verse 41).
And so Jesus prayer was answered! Those who had Jesus put to death were forgiven!