Jesus paid the penalty for the sins of the world, He was not a sinner. Jesus was sinless and fulfilled the law completely. His perfection is acceptable as a sacrifice to God the Father as His blood was shed and His life given to pay the sin debt.

Baptism is not what transfers the righteousness of Jesus to a sinner. Belief through faith is what God says is required. It has always been faith, from Abram until the present day, faith is the catalyst.