Sadly you were unlucky with your koi but what I cant understand is how long had this been going on for it to get so thin ?
Do you know how to anethitize your fish so that in future you can check yourself for obstructions in your koi's mouths rather than pay vets bills .
I've had koi from time to time with obstructtions in their mouths and its a simple matter to anethatize your koi pop a pair of tweezers in its mouth gently opem it and look inside , then if your koi's mouth is obstucted its a simple matter of hooking it out.
Heres an article I did on the various stages of anesthetics and how to use them :-
https://www.gardenpondforum.com/articles/the-various-stages-of-anaesthetics.5/
Hope this help in the future ?
Dave