Weaning a 2yr old

I need to wean my almost 2yr old. I am now pregnant and noticed every time I bf her i start cramping plus i just can not handle the pain because of how sore and tender my breast are. :(