You’ve got pretty much a terminal case. The long skinniness of the plant tells that the plant has had way too little light or sun. It is stretching and doesn’t even look like what it should. By looking at the size of the plant, I’m guessing that it was in a smaller pot – it still should be. The size of the pot you moved it into is way too big. It is holding a large volume of soil that when it gets wet, it stays wet a long time as the cactus has a relatively small root system – it could in no way take up all that water. When cactus roots stay wet for any length of time they are subject to rot. Also, when you transplanted it you probably watered it in right away. When transplanting cacti or succulents they should sit in the new dry soil for about 5-7 days. This allows any roots that got broken or damaged during transplant a chance to callus over and heal. Watering right away allows fungus and bacteria into the damaged roots and then the problems begin.