The 32-year-old convinced an independent panel that he mistakenly consumed his wife’s dietary supplement before failing the test on 7 February.
His ban has been backdated to February, despite Johnson playing four times for Wasps since then.
Hydrochlorothiazide was found in his urine in an out-of-competition test.
South African Johnson said: “I was horrified when I got the test results and once we tracked back and worked out I had inadvertently taken the wrong tablet.
That would have seen Johnson miss three further league matches, with Wasps opening their 2018-19 campaign at Worcester Warriors on 1 September.
He will now be free to resume playing from 7 August.