The ending of Avatar (2009) settles the war on Pandora and Jake's identity at once: the RDA is driven off the moon, and Jake becomes Na'vi for good. It reveals the end of the film and the opening of the sequels, and the reading below is my opinion.
After the battle at the Tree of Souls, the surviving humans are expelled from Pandora. In a ritual at the Tree of Souls, Jake's mind is permanently moved into his avatar body, and he starts a new life among the Na'vi with Neytiri. Why does that matter? Because the film has been building toward it since Quaritch's bargain: the colonel offers to restore Jake's legs in return for the location of Hometree, and the ending gives Jake a body that works without any help from the RDA. It could be argued that the transfer completes a choice Jake began when he sabotaged the bulldozer, and that the earlier betrayal, Jake's confession and the loss of Hometree and Eytukan, is what he pays for it.
The order of the final act is worth following closely. Grace is fatally wounded in the escape that Trudy makes possible, Jake bonds with Toruk to unite the clans, and the wildlife of Pandora joins the fight at the Tree of Souls. Quaritch then exposes Jake's human body to the toxic atmosphere, and it is Neytiri, not Jake, who kills Quaritch and saves him. In my opinion, that choice is the film's cleverest piece of staging: the human who arrived as an outsider is rescued by the people he betrayed and then joined.
The film resolves the fight but not the larger problem. The Na'vi are free, yet Earth's interest in Pandora remains unresolved, and the sequels pick that thread up. Avatar the way of water opens sixteen years later with Jake leading the Omatikaya and a revived Colonel Quaritch returning as a recombinant, a Na'vi body carrying the memories of a dead soldier. That is a notable retcon of sorts for the character, since the first film ends with Neytiri killing him. Avatar fire and ash then follows a Sully family grieving Neteyam and facing Varang's clan, which shows how far the saga has moved from the clean good against bad split of 2009.
I would say the 2009 ending is a closed story with an open door, and that explains why the saga could continue toward avatar 4. For where this sits in the wider story, see the avatar timeline.