I'll qualify what you're about to read by saying that I have just run 1-13 mile long run in a state of ketosis.
So, unless you had trained in a state of ketosis, I think you didn't pre-fuel your body enough.
If you had trained in a state of ketosis for the whole training cycle, then I have no idea except to get thoughts from successful ketosis triathletes about your bonk. And I hope I get to read the thread. Good luck.