2 Corinthians 5:21, [God] made Him to be sin who knew no sin, so that in Him we might become the righteousness of God.
Jesus Christ died a sinner—He died a sinner’s death. Not that He actually committed sin, but on the cross He became sin and His righteousness becomes ours (i.e. justification by faith). This is no metaphor, for if it were, our faith would be a figment of our imagination, rendering Christ’s crucifixion meaningless. For the Jews—His own people—charged Him with blasphemy, claiming to be the Son of God with the authority to forgive sins. According to the law, this is punishable by death, so they judged Him a sinner though He knew no sin and became sin for us on the cross.
And this was His choosing. He could’ve commanded a fleet of angels at any moment, but He didn’t, for that was not His mission. His mission, in His own words, was, “The Son of Man came not to be served but to serve, and to give His life as a ransom for many” (Matthew 20:28). Thus, He became sin for us on the cross and paid the ransom for our guilt with His blood, so that we might receive His righteousness and therefore become blameless before God.