No, he didn't. He ruled they can't bully states into complying with a massive Medicaid expansion by threatening their existing Medicaid funding.
There was never an option for states to opt out of the Mandate. How can they, when the mandate is being collected from individuals by the IRS?
If Roberts is so smart then why didn't the other 4 conservative judges agree with him? Are liberals the only ones smart enough to agree with Roberts?
What Roberts did was to allow unlimited taxation of individuals for any reason whatsoever, including to coerce individuals into engaging in commerce. That could reasonably have been construed as not allowed by the enumerated powers.