Bible Answer

When Jesus was on the cross, who was the “forgive them” referring to?

If I understood correctly, the only unforgivable sin mentioned in the Bible was blasphemy in regards to those alive during the short time that Jesus walked the earth. When Jesus hung on the cross and said “Father forgive them, for they know not what they do” wouldn't all of his wrong doers been forgiven?

Jesus’ statement on the cross was not a blanket statement of forgiveness for all humanity on earth or even for all Israel in that day. We must interpret Scripture based on its context, and from the context of Jesus’ statement, He was speaking about the handful of Roman soldiers carrying out His execution. In fact, we see evidence that Jesus’ request was granted for at least one of the soldiers:

Luke 23:46 And Jesus, crying out with a loud voice, said, “Father, INTO YOUR HANDS I COMMIT MY SPIRIT.” Having said this, He breathed His last.
Luke 23:47 Now when the centurion saw what had happened, he began praising God, saying, “Certainly this man was innocent.”

Elsewhere, Jesus makes clear that the Pharisees and many in that generation of Israel would not be saved because of their unbelief:

Matt. 16:4 “An evil and adulterous generation seeks after a sign; and a sign will not be given it, except the sign of Jonah.” And He left them and went away.
Mark 8:38 “For whoever is ashamed of Me and My words in this adulterous and sinful generation, the Son of Man will also be ashamed of him when He comes in the glory of His Father with the holy angels.”
Matt. 12:41 “The men of Nineveh will stand up with this generation at the judgment, and will condemn it because they repented at the preaching of Jonah; and behold, something greater than Jonah is here.
Matt. 12:42 “The Queen of the South will rise up with this generation at the judgment and will condemn it, because she came from the ends of the earth to hear the wisdom of Solomon; and behold, something greater than Solomon is here.
Matt. 8:11 “I say to you that many will come from east and west, and recline at the table with Abraham, Isaac and Jacob in the kingdom of heaven;
Matt. 8:12 but the sons of the kingdom will be cast out into the outer darkness; in that place there will be weeping and gnashing of teeth.”

Clearly, not all Israel was saved in that day when Jesus uttered the words “forgive them”. The “them” Jesus spoke about were the Romans soldiers attending to His crucifixion.