He didn’t.
It may or may not have been an infallible teaching of the church, but Pope John Paul’s pronouncement was not in and of itself in fallible, and that it wasn’t infallible was confirmed by the Congregation for the Doctrine of the Faith, then headed by Cardinal Ratzinger.
He did.
You are mistaken on two counts. It’s without doubt that this teaching regarding the ordination of females is infallible.
On the first count, this teaching has been infallible throughout the centuries. It has been taught
ubique, semper et ab omnibus (everywhere, always and by all). On the second count, St. John Paul’s pronouncement was also infallible as he was “exercising his proper office of confirming the brethren (cf. Lk 22:32), [handing] on this same teaching by a formal declaration”.
Many people seem to misunderstand that teachings can be infallibly made by the pope without using his extraordinary magisterium. The Pope utilizes his extraordinary magisterium when he speaks
ex cathedra. Such a statement is infallible. As
Lumen Gentium 25 shows us, the pope can
also speak infallibly through his ordinary magisterium, as he did in
Ordinatio Sacerdotalis. He could not have been more clear.
A good overview of both the ordinary and extraordinary magisteriums
can be found here.
More helpful resources in understanding this can be found
here and
here.
Finally, I don’t know what “confirmation” you’re referring to by Cardinal Ratzinger. I’m guessing
you mean this, but I’m not sure. So if you could provide a link, I’d appreciate it.
The preceding letter by Cardinal Ratzinger, as head of the CDF, directly contradicts your claim. But if you’re referring to either of Cardinal Ratzinger’s two letters from Oct. 28, 1995, then you’ve unfortunately and clearly misread them both. He’s pretty clear here:
Dubium: Whether the teaching that the Church has no authority whatsoever to confer priestly ordination on women, which is presented in the Apostolic Letter Ordinatio Sacerdotalis to be held definitively, is to be understood as belonging to the deposit of faith.
Responsum: Affirmative.
This teaching requires definitive assent, since, founded on the written Word of God, and from the beginning constantly preserved and applied in the Tradition of the Church, it has been set forth infallibly by the ordinary and universal Magisterium (cf. Second Vatican Council, Dogmatic Constitution on the Church Lumen Gentium 25, 2). Thus, in the present circumstances, the Roman Pontiff, exercising his proper office of confirming the brethren (cf. Lk 22:32), has handed on this same teaching by a formal declaration, explicitly stating what is to be held always, everywhere, and by all, as belonging to the deposit of the faith.