AITA for grounding my son indefinitely after he outed his brother?

I have a brother who had a son (Asher) with some nutter literally the same day as my son was born (Landon). Yes, they have the same birthday. My (then) ex and I took custody and eventually adopted Asher when he was 2 because my brother and his nutter girlfriend got into some nonsense.

We raised Asher and our bio son Landon as brothers and told people they were twins. Thry were more twins than not. Asher and Landon look very very alike. Both boys know the back history and know it's no one's business. Asher would NOT be as well adjusted if he had been raised as the "adopted" kid.

Both boys are 11. They hang around in the same social crowds and go to the same school. Then yesterday, Landon's teacher told me what a good man I was and how she had no idea that Asher was really my nephew. I asked her where did she hear that. She said Landon.

He apparently made the comment after one of the TAs asked him if I was a strict dad or something. I told his teacher that my son had zero business disclosing that. It's very private and I'd appreciate it if she forgot about it.

I asked Landon and he denied it. I asked him how did his teacher know? I told him that he knew not to put family business out there and now he did. I think he was just trying to impress the TA or something. Asher now feels "less than" and worries that other people will find out and throw it in his face.

As a result, I grounded Landon until further notice. No screen time, no play dates, no staying up late, no desert, etc. I don't know how else to get my message across. His mom/my ex agrees that he should be taught a harsh lesson but I went way overboard.

Eventually I'll start giving his privileges back but he needs to learn his lesson.