The key to transforming afflictions into enlightenment lies in discipline. A life with discipline is not afraid of afflictions, but is afraid that wisdom will not be generated when afflictions arise because of no proper discipline of the Dharma.
It’s like in daily life, don’t be afraid of gaining weight, but rather afraid of not exercising. With regularity and discipline, living life in the right way, one can eventually transform fat into muscle and transform afflictions into enlightenment.