Unfortunately, there isn't a legitimate way to play Star Wars: Battlefront II online completely free. The multiplayer requires the actual game.
If you're looking for a taste of it, some Xbox titles that bundled demo content, such as certain editions tied to Revenge of the Sith or bonus discs, let you try a Battlefront II demo without buying the full game.