How can I prevent my plant from dieting the leaves are turning brown 4 or 5 inches from the tips it's also wilting?
The yellowing leaves could be a watering issue, in the case of a Yucca, you are likely overwatering.
They like to be on the dry side. Allow the soil to dry before watering again.
If the soil is soggy, the plant could be suffering from root rot.
Here is some links to help you.