The best way, and I hate these terms used on here, is to qualify her. Instead of jumping right into the conversation and providing support / advice - show disinterest in the topic. Like, you're not interested, and don't care. Act aloof, maybe nudge your head as if you're sighing. She'll pick up on this, realize its turning you off, and try to win you over so to speak. They don't want you to think they're boring you. It gives them a bit of a challenge when you're not interested or impressed so easily. You can also change the topic, and the mood. But usually acting disinterested will cause them to change it.
The problem isn't so much getting involved in these topics - its qualifying themselves to the girl. They do it because they think its going to win them brownie points. They think its how to win her over. It never ends with just listening. They go all out, and become the nice guy to prove that they're so great and different and wonderful. They understand her, they are always there for her, blah blah. And that's when she becomes the prize, they're fighting for her, trying to win her over, and (of course) she loses interest and regulates him to the friend-zone. He's trying too hard. Listening to all her problems, providing emotional support, trying to be the one she doesn't ***** about, being the perfect SO they can possibly be... It's all out of approval seeking. They care way, way too much about winning her over, and doing everything right. She picks up on this, and loses interest.
Most girls who lose interest do so because the guy is showing too much interest in her. He's too easy, too available, too eager, too agreeable... No challenge = no attraction. They will even say, after they friend-zone you, that they KNOW you already like them. This turns them off.
Beyond that, you just have to act like a boyfriend - not a friend. Try to focus on action activities, and being upbeat and exciting. Don't just listen to their problems, and bore them to death. Get the sexual vibe going, and don't avoid their sexual advances. Change the mood if it seems too friendly. Don't be so available and talk for hours and hours. Don't act like a friend.
Remember: people only come to you for certain things if you provide those things. If you make it clear that you won't be their emotional tampon - they won't treat you like one. They won't complain about their problems if you don't provide emotional support, give them advice, listen to all their problems, etc. People view you as you make them feel, so make them feel excited, sexual, wanted. Act like a boyfriend, and you will become one.