From what I can tell with a quick reading, it is not. The opinion states that the fee is a tax and not a penalty and based on that ruling then further rules that the tax oversteps Congress’s delegated authority.
The whole penalty thing seems weird because obviously it’s not a penalty, so I don’t know if the president’s lawyers argued a dumb point and lost or if I’m missing some legal nuance here.
Regardless, the opinion is based on the ruling that the fee amounts to a tax, not that fees must be justified.