UniversalWolf: If you cheated and levelled your character up to 20 before going to Dantooine, you'll never be able to become a Jedi. Progression is capped at level 20, and Jedi is a class so you have to take levels in it just like Smuggler or Soldier or Scout.
At the start of the game you have to figure out which jedi class you want your character to become, and at what level. Then, at some point, you can stop levelling up until you get to Dantooine and become a Jedi.
For example, I like the Smuggler/Guardian combination. If you look at the feats and skills you get for each class at each level, it makes sense to get my Smuggler up to level 7 on Taris, and then stop until I become a Jedi Guardian on Dantooine. Then I usually gain about 3 levels of Guardian at once.
The best way to do it varies for each class combination, though.
John.H: well that sucks why they put a console or cheat codes in the game?i used an editor I only did credits and attrubuts.i lvled uup the right way...
The first KOTOR always had a little bit of controversy about not starting as a jedi and pretty much forcing you to level up with a basic class, making your character losing precious levels in a class you won't probably care about, in fact beside the smuggler class, that is also the harder to start with, is also the only one that give you a unique feat capable of increasing defense
Soldiers start with heavy armours, useless for a jedi, and scout gain the implant feat, again not very useful but at least usable
What pretty much all players did since the realease of this game is to either use the savegame editor to "reset" your base class at level 1 just before becoming a jedi, or using a mod that permit you to start as a jedi from the beginning
KOTOR 2 fixed this problem by removing it completely, as you start as a jedi