You seem to be misunderstanding how forgiveness of sin works in God's legal system, so let me also provide a quick explanation with my answer.
1 John 4:10 In this is love, not that we loved God, but that he loved us, and sent his Son to be the propitiation for our sins.
Christ was sent to be, and sacrificed as, a propitiation for the sins of His people. A propitiation (also called
atoning sacrifice) can be thought of as a vessel for sin to be laid upon in order for justice to be exacted upon it (instead of upon the guilty party). We see this type in the Old Testament quite often, where animals (who cannot commit sin) were sacrificed to atone for the sins of man. However, this was not a spiritually sufficient sacrifice, but served merely as a foreshadow of what God Himself would do. Carrying out the sacrifice was how righteous men displayed their trust in God that He would provide that sacrifice for them.
God cannot allow sin to go unpunished, as that would be a lapse in His justice, making Him unjust. Because God is just, and cannot do things that are against His nature, His justice must be fulfilled, so the punishment for sin must be carried out.
Romans 6:23 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord.
Where "death" means "infinite spiritual separation from God". That means that a finite being receiving that punishment must receive it eternally (for an infinite amount of time), whereas an infinite being (ie, God the Son) is capable of fulfilling that punishment for a non-infinite amount of time. This is what occurs on the cross when Christ exclaims "Why have you forsaken me?" At that very moment, the perfect communion that the Son had had with the Father for all eternity past was ruptured infinitely. The resurrection shows that this communion had been restored, the sacrifice accepted, and forgiveness for sin achieved and granted for all who believe and trust in that finished work alone.
1 John 3:5 And you know that he was manifested to take away our sins; and in him is no sin.
So, though Christ carried the sin of His people, He Himself was not guilty of sin, He was a spotless lamb, without blemish (ie, sin). So there was no sin that He needed to be forgiven for. If He had sinned, He wouldn't be God, and wouldn't be infinite, and could not have served as a perfect, infinite atonement for the sins of His people.