How to stop a 17 month old from breastfeeding?

mo

Hey guys, I have a 17 month old that still lives on my breast and is really attached to me. A few weeks before I had to take medication and wasn’t able to breastfeed him and he was crying nonstop and kept me up all night. Do you guys know any ways to stop breastfeeding him?