Sounds like your recruiter took advantage of your first-time traveler status. Housing should be free- you should never have to pay for your own travel housing. ALWAYS get pay rates quoted that include free housing, insurance, travel reimbursements, etc. Many dishonest companies will lure you in with high pay rates, but then fail to tell you that all of your housing, benefits, etc. are deducted from your pay.
You should be getting free housing, and if your company couldn't find you housing close to your assignment, they should be reimbursing your daily mileage to travel to and from work. They should have also reimbursed your travel expenses. Most companies offer at least $500 travel reimbursement, with no requirement to re-pay those funds. Unfortunately, since you did not confirm any of this prior to accepting the assignment, it probably isn't in your contract, so you really wouldn't have much recourse.
I would chalk this up to a lesson learned, and do more research on your next assignment- find a new travel company, and ask them about everything- never assume anything. What company are you with now?