Here you will useful links on how to find accommodation in Stockholm. Some international student groups are guaranteed housing through KTH while others find housing on their own.
Find out who are guaranteed housing and read about the application procedure at the KTH Accommodation site
How to find housing on your own
SSSB- Stockholm Student Housing Foundation
Regardless if you receive accommodation through KTH or not, we recommend that you join the SSSB accommodation queue. SSSB is a public housing queue for students and you can apply 90 days before you become a student union member, which is a requirement. You will not get housing through SSSB right away but after about a year in the queue you will usually get an offer. Once you've joined the queue, start looking for accommodation through other housing companies and private ads.
How far away from campus can I live?
The average commuting time in Stockholm is 40 minutes single journey. To find out if the accommodation you are interested in is within commuting distance from the campus you can use the travel planner on the website of SL (Public transport in Stockholm).