It's not unethical, in the legal sense, as in you really have no method of recourse against them for any reason. You also probably shouldn't complain to the manager, as it's probably not their call as to what the company is hiring for, especially if it's a large company (large companies often have "hiring pools" from which managers can take candidates they like; it's very rare that a manager in a large company will specifically hire for a specific position, at least not until a placement stage which happens after the offer stage).
If you would like to complain to someone, you should complain to the recruiter who introduced you to that company, especially if that recruiter is a 3rd party recruiter (not someone internal to the company). Speaking specifically about 3rd party recruiters, it's important to let a 3rd party recruiter know for 2 reasons:
1) Recruiters get paid when candidates get placed, usually as a percentage of that candidate's salary. If the recruiter does a bunch of work but the company is stingy and won't let the recruiter place a candidate, then the recruiter is wasting their time. Recruiters don't want to waste their time, so they should be made to know if the company is being stingy.
2) Client behaviour can impact a recruiter's image. For example, if I talk to a recruiter and tell them my background is Java backend, and they send me to a company who wants to hire Ruby frontend developers, I'm going to be pretty mad at that recruiter for wasting my time sending me to a company that wasn't a good fit. This is a simple obvious example, but the same holds in your case; the recruiter sent you to a company that was not looking for someone with your qualifications. This looks bad on the recruiter. Now, hopefully, the recruiter didn't do this maliciously, and it's likely there was a simple miscommunication between the recruiter and the company. However, that doesn't change the fact that this is what they did, and this looks bad on their image as a recruiter. If the recruiter wants to maintain their image and reputation, they should not deal with companies who miscommunicate their expectations and waste applicants' time (and recruiter's time placing those applicants!). So once again, the recruiter should be made to know if this is going on.
Internal recruiters have neither of these concerns, so if you're dealing with an internal recruiter these statements do not apply. As such, you can do whatever you feel is right.
The rest more or less depends on how much you would like to pursue this company in the future. Do you believe this is a miscommunication, or do you believe this is a symptom of a systemic problem in the company as a whole? If you believe you would like to pursue this company in the future, then you should probably just drop it; you failed the interview for whatever reason (in this case by no fault of your own, just to be clear; the company is 100% in the wrong here, but that doesn't change the fact that you didn't get an offer), try again next time. If you feel like this has left such a bad taste in your mouth that you are no longer interested in the company, then feel free to say whatever you like to whomever you like; if you consider their bridge burned with you, then you have no problem burning your bridge with them.
In either case, I would write a review on a job posting review board (if the company is North American then my recommendation would be Glassdoor; if not, then use whatever is popular for your locale) detailing your experience. Most of these boards are anonymous so the company wouldn't know it was you, and at the same time you will be warning people of these sorts of experiences. I know that I personally look up every company I interview with on Glassdoor before I consider applying/interviewing there, so as much as you may think "nobody reads that crap what am I really wasting my time on?", there are people who really do read it and listen to what people say there.