alphagirlzk:
Please don't use the title of your thread as the first part of the first sentence of your post. What this does is create a sentence fragment in the body of your post, and requires extra effort on behalf of the reader, who has to figure out what you're talking about. Instead, try making your title more descriptive of the thread's topic. Thanks.
As Samoht04 said, the "freerealestate" cheat is a testing cheat, and will only work after entering "testingcheatsenabled true" first. Also, it can only be used in edit town.
The easiest way to move him out by this method is to go to edit town, and use the "split up household" option on the family panel to remove the sim in question. This places the sim on your clipboard. He will retain any friendships, jobs and family relations, but will lose any and all promised short term wishes. You can then move him into any house you like by using the cheats as described above.