They are distinct and different movies written and directed by different people with different people playing different roles. They are similarly named, but that's it. I really, uh, don't know how to explain it any better.
M. Night Shyamalan's movie is
technically titled The Last Airbender. It's preview:
http://www.imdb.com/video/imdb/vi4008247833/The story follows the adventures of Aang, a ten year old successor to a long line of Avatars, who must put his childhood ways aside and stop the Fire Nation from enslaving the Water, Earth and Air nations.
Avatar, by James Cameron and company, is this movie:
http://www.imdb.com/video/imdb/vi2804482585/Jake Sully is a paraplegic war veteran who is brought to the planet Pandora to participate in a program designed to help him walk again. The program introduces him to his avatar, a creature whose genetics are half human and half Na'vi, a sentient humanoid race who inhabit Pandora. In time, Jake will find himself in the middle of an escalating conflict between the two races.