It's a traditional proverb, and it would be impossible to trace the original.
The earliest version in the Oxford Dictionary of Proverbs is from John Heywood's 'A dialogue containing the number in effect of all the proverbs in the English tongue', first published in 1546. The form used by Heywood is 'Though chaunge be no robbry for the chaunged case' (Heywood's spelling, not mine). The title of Heywood's work suggests that the saying was already proverbial in the sixteenth century.
The earliest quotation in the modern form is from Tobias Smollett's 'Roderick Random' (1748): 'Casting an eye at my hat and wig, .... he took them off, and clapping his own on my head, declared that a fair exchange was no robbery'.
Sir Walter Scott, in 'A Legend of Montrose' (1819) has 'The sword is an Andrew Ferrara, and the pistols better than my own, but a fair exchange is no robbery.'