too little light with too much water will do this
cut main stem about 1/2 way up from caudex ...... if you see any discoloration * other than white or green *
if what you see is: tan, light brown, dark brown or black - then, cut main stem 1" down ..... if you continue to see tans, light browns, dark browns or blacks - keep taking 1" slices until you only see white or green .....
tan, light brown, dark brown or black is rot and it will continue to spread if not removed ...eventually killing the plant
find a brighter sun-lit spot or purchase a grow light
water very sparingly