I found the last boss a bit too hard at first but after finding its pattern, it was one of the easiest boss i ever beaten in a video game.
The trick is to stay in the middle of the room, near the gate (this is the best position as it gives you a view on the whole room) and check when the Snake passes with his mouth closed .
When he does, you'll be 100% safe to just go there, collect the fireflies and repeat.