For one you should have centralized your king before making all those pawn moves, especially g4. Given that his king is already active and yours hasnt even moved at the start of the sequence you posted, I would say you went wrong before that.
Active king is one of the most important things in the endgame.
I recently played a difficult endgame up a knight and ended up losing. What's the best line of play in this position?
This is how I played it with my thoughts in the comments - where do you think I went wrong?