You may be able to withdraw your full KiwiSaver balance if you are suffering from a serious illness.
A serious illness is an injury, illness or disability that:
results in you being totally and permanently unable to engage in work for which you are suited by reason of experience, education or training (or a combination of these things); or
poses a serious and imminent risk of death.
You'll need to get a signed declaration from a doctor and submit a KS5 form to the IRD. They will then assess your application and let you know the outcome.