I agree, it looks like
Spineless Yucca (Yucca gigantea) and the issue appears to be crown rot but hopefully the main stem has not rotted completely. You can prune the top off and if there's still viable wood on that stem, it will eventually produce new side branches just below where the main stem was cut. If rot has progressed down inside the stem, there's probably no hope for recovery of the plant.
You can cut it a few inches up from the soil level or cut the very top off (with all the leaves.) You will have a bare stem for awhile but if there is still life in there, you will eventually see new shoots coming off the bare stems.
This photo from our database (blue link above) shows new growth coming from the main stem: