There isn't a traditional cheat code, but there's a multiplayer trick worth knowing. When creating a game or account, head to the Hero Options and find the slider that controls how much time passes before a player can become a Jedi or Sith again.
Set that timer to its minimum, then play. This means heroes become available almost constantly—so you'll need to be skilled enough to claim them before anyone else does. If you can dominate the match, you'll get first pick of the Jedi or Sith.
Good luck, and have fun out there!