The paternity of the mother's husband can be challenged by only two people: the husband himself, and the child. In such cases the husband benefits from being presumed the father.
The paternity of the man who has acknowledged the child may be contested by all of the parties concerned, which includes the mother and the man who claims to be the biological father.
Consult a lawyer to find out the conditions and deadlines that you must meet to contest paternity, as well as the court responsible for the matter. (/where you must file your petition).