Is it Luther? Sure sounds like him, doesn't it?
But no, it isn't. Try about 1300 years earlier...from the bright Mediterranean world rather than late medieval northern Europe. It's Mathetes (a pseudonym which simply means 'The Disciple'), writing in his epistle to Diognetus about the late 2nd century AD or possibly earlier (some scholars think he may have been a disciple of the apostle John, based in part on his preference for the term 'the Word' to refer to our Lord Jesus Christ).
The 'sweet exchange' - our sins for Christ's righteousness - was one of Luther's favourite themes; here's proof that in his rejoicing over this image of the pure Gospel Luther had antecedents in the very early church...
“As long then as the former time endured, He permitted us to be borne along by unruly impulses, being drawn away by the desire of pleasure and various lusts. This was not that He at all delighted in our sins, but that He simply endured them; nor that He approved the time of working iniquity which then was, but that He sought to form a mind conscious of righteousness, so that being convinced in that time of our unworthiness of attaining life through our own works, it should now, through the kindness of God, be vouchsafed to us; and having made it manifest that in ourselves we were unable to enter into the kingdom of God, we might through the power of God be made able. But when our wickedness had reached its height, and it had been clearly shown that its reward, punishment and death, was impending over us; and when the time had come which God had before appointed for manifesting His own kindness and power, how the one love of God, through exceeding regard for men, did not regard us with hatred, nor thrust us away, nor remember our iniquity against us, but showed great long-suffering, and bore with us, He Himself took on Him the burden of our iniquities, He gave His own Son as a ransom for us, the holy One for transgressors, the blameless One for the wicked, the righteous One for the unrighteous, the incorruptible One for the corruptible, the immortal One for them that are mortal. For what other thing was capable of covering our sins than His righteousness? By what other one was it possible that we, the wicked and ungodly, could be justified, than by the only Son of God? O sweet exchange! O unsearchable operation! O benefits surpassing all expectation! that the wickedness of many should be hid in a single righteous One, and that the righteousness of One should justify many transgressors! Having therefore convinced us in the former time that our nature was unable to attain to life, and having now revealed the Saviour who is able to save even those things which it was [formerly] impossible to save, by both these facts He desired to lead us to trust in His kindness, to esteem Him our Nourisher, Father, Teacher, Counsellor, Healer, our Wisdom, Light, Honour, Glory, Power, and Life, so that we should not be anxious concerning clothing and food..”Mathetes, Epistle to Diognetus 9