Play up your strength of being able to work independently.
This is also a highly desirable trait that employers are looking for. They want workers who can take the initiative to figure things out and solve problems on their own, without needing constant input or help from others.
Focus on this positive aspect, and support it with examples of how you were able to achieve success working on your own.
Do not, however, place this in opposition to working with a team.
"I work better independently than as a team" does come across inherently poorly. Even though it may be true, and not a bad thing, putting things that way will raise questions about whether you have the ability to work on a team. You need to emphasize your competence as a team player for pretty much any job.
Find a job that fits your preference by doing research and asking questions, rather than expressing this preference to potential employers.
Ultimately, saying "I prefer to work alone" to an employer does little good, because usually they are not going to adjust the way the role works to your preference, and you come across as potentially not a team player, as discussed above.
Instead, do your research and try to apply for the right jobs where you are likely to get the opportunity to work independently. Look at things like company size and the description of the role to help determine this.
Also, ask intelligent questions about the company's way of working, either at interview or even in a phone conversation before you apply, to try to understand what your role would be like. But do it as an information-gathering exercize, rather than outright expressing a preference. You can then use this to help evaluate which jobs are a good fit from you.
Finally, one word of warning: do not conclude too much from your experience at one company.
Are you sure you actually dislike working in a team? Or perhaps it was just the way the team worked at that particular employer? Working on a poorly managed team is a disheartening experience for nearly anyone. So, if you have limited workplace experience, it may be worth giving a more team-oriented environment another try.