Sorry to hear about your Yucca. I don't think it's a light issue. I can only assume it's root rot. What type of soil did you use? Yuccas will not tolerate soggy soil. They require well draining soil. I'd plant in a container so after watering you can see if there is water in the bottom. Ideally water in the sink or outside and let it drain for 5 min. No fertilizer except light application in early summer.