Will a new job really solve anything?

I'm lonely and frustrated at the office. I've been trying to get a new job for several years. I feel stuck in a hell hole on some days, but the job itself really is pretty cool. If only certain people were working somewhere else. But if I did get a job somewhere else, would things really be so much better with that company? Every company has some kind of flaw or weakness about it.