It's a silly comment
It's true that if you have not had a baby pass through the cervix
that it tends to look different than a cervix that has not had a baby pass through.
Of course, this also applies to having a baby or babies by cesarean. Truth is, you cannot tell someone's age by looking at their cervix. Your doctor just made an idle comment of no real significance. It happens sometimes. No need to worry.