I have seen it everywhere and you probably did too. Nice guys complaining how they end up in friendzone and the girl chases an asshole. Nice guys complaining how they treat girls nicely and they all want assholes who treat them like shit.
However the reality is women don't like assholes, but they prefer them over nice guys for their manly qualities. Women want in men with qualities that usually are usually not very developed in most women: courage, confidence, strength and many more. Usually the bad guy is the one that looks confident, independent, brave, not the nice guy looks like he can't take care of her and protect her. The truth is you don't have to be a dick to get women, you just need to be a real man.
Let's take for example the movie Gladiator. Maximus was the manly man, the alpha dude, but not the asshole. He was the best, yet he loved and protected his family. He treated people with respect and in return he was respected. The asshole was the emperor and in the end, everyone respected and liked Maximus, not the emperor.
Also, a girl may put you into the friendzone for many reasons and being too nice isn't one of them:
1. She might not think you are good looking enough.
That doesn't mean you are ugly, but maybe you aren't the type she finds attractive. Telling you that isn't necessarily helpful. You aren't always fat or with bad hygiene, you might just be a normal guy that can't do much to improve his looks. Telling you that might do more damage than good in some cases.
2. You don't have what she wants in a man.
Sure, you might get along as friends, but women need more than that. That is why I said they like the assholes for their manly qualities. You must show them that you are independent, that they can rely on you and that you can take care of them and protect them. Even if they can sustain themselves and nowadays life isn't as dangerous as it used to be in the past, it is a subconscious desire for women to want that in a man. In order to show that you need to show confidence, stand up for yourself, strive to be successful, be trustworthy and keep you word.
3. She might have problems herself.
Sometimes it is not about you, but about them. She might not be ready for someone nice and caring. Maybe she has a past of bad relationships and she doesn't know better. Or maybe she isn't the type that is looking for a committed relationship.
In any case, being passive aggressive about someone not wanting you, will not make them want you. So, making them feel bad for not wanting to sleep with you just because you were nice is going to push them further away. It is ok to tell them that you think you deserve to be treated better by them, but don't push it too far. Just say what you have to say, if they ever cared about you they will realise their mistake, if they never did, you can talk as much as you want, there won't be much of a difference.