The ban is backdated to 28 February, 2020 and means the swimmer will miss this summer's Olympics in Tokyo.
A new Cas panel held the latest hearing after a Swiss Federal Tribunal ruling.
The 29-year-old missed a doping test in September 2018 and was given an eight-year ban for his second offence.
He was first cleared of wrongdoing by Fina, the swimming federation, in January 2019.
But after an appeal by the World Anti-Doping Agency (Wada) to Cas that decision was overturned.