“Are you and people like you trained to talk to people like me?”

The 17-year-old transgender girl’s question took medical student Nicholas Bonenfant by surprise. The gay pediatrician-in-training was leading a medical questions-and-answers session in a Boston LGBTQ youth clinic in July 2016. He came prepared to answer questions about anxiety and acne, not transgender health. Having received little training on the topic, he felt helpless.

“I was so caught off guard by what she asked, but also, I just didn’t have an answer to give her,” Bonenfant told NBC Out.

“I think if I had had a pediatrician who felt more like an ally to me, I would have been a much more confident kid ... I wouldn’t have struggled so much, through all of adolescence, with just accepting who I was.”

The girl, who was assigned male at birth, told Bonenfant that when she went to see a pediatrician, he argued with her about her gender identity.

“She felt a lot of judgment in her pediatrician’s office in the city, which was surprising to hear,” Bonenfant said.

Her story reminded the the University of Vermont medical student of his own experience going to a pediatrician and the reason he decided to become one. He recalled the pediatrician often joking about whether he had a girlfriend, or if there were any “cute girls” in his class.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“When I was young like that, I knew that my feelings and emotions didn’t match what this medical authority — this pediatrician — was saying, which made me feel like there was something wrong,” Bonenfant said.

Medical Student Nick Bonenfant '17 working in an acting internship in the Pediatrics Department at the UVM Medical Center. David Seaver / UVM Larner College of Medicine

The 27-year-old decided to help future pediatricians be better aware of LGBTQ health issues, especially those affecting transgender kids and LGBTQ youth of color.

“From the experiences I’ve seen, some pediatricians don’t have the patient population or the knowledge based in transgender health to provide the most comprehensive care,” Bonenfant said.

LGBTQ youth of color also face a number of disparities in seeking and accessing health care, according to Bonenfant. He pointed to statistics from the Centers for Disease Control that show 38 percent of African American males who received an HIV diagnosis in 2015 were between the ages of 13 and 24.

“A lot of these kids don’t have the structural or financial support to get the medical help that they need,” he explained. According to Advocates for Youth, LGBTQ youth of color are less likely to be out to their families. Bonenfant said some LGBTQ youth, regardless of race, may avoid medical help due to fear a pediatrician will out them to family.

“Feeling as though a pediatrician or provider wouldn’t maintain confidentiality in disclosing an LGBT identity is something else that I’ve heard from kids that I’ve spoken to,” Bonenfant said.

For his fourth-year research project, Bonenfant developed a series of educational resources for medical students on topics related to LGBTQ health. They include electronic learning modules that focus on PreP (an HIV-preventive medication), transgender health and the unique barriers faced by LGBTQ youth of color. He believes his project can prepare future pediatricians to be strong advocates and confidential allies for LGBTQ kids.

Fourth-year medical student Nicholas Bonenfant presents his scholarly project to UVM Medical Center residents Andy Duback / UVM Larner College of Medicine

“I think if I had had a pediatrician who felt more like an ally to me, I would have been a much more confident kid,” Bonenfant said. “I wouldn’t have struggled so much, through all of adolescence, with just accepting who I was.”

In March, Bonenfant presented his research to medical students at a national conference in California. He said he is working with his adviser to incorporate the learning modules into the curriculum at the University of Vermont's Robert Larner College of Medicine, where he studies. He said he also plans to make the resources available on MedEdPORTAL, an open-access publication available nationally to medical students and health professionals.

“Right now we’re hoping to make a big impact here at UVM, but taking it to a bigger level is something that would be fantastic,” he said.

Bonenfant will start his pediatric residency training at a local hospital in Vermont after he graduates in May, and plans to specialize in LGBTQ health when he becomes a practicing pediatrician. He said his biggest motivation is not only educating others, but himself.

“It’s taught me to try to never alienate a patient the way that I felt when I was younger, and that our education isn’t from what we’re told to learn, but that it’s so important to explore topics that we come across and educate ourselves as best we can,” Bonenfant concluded.

OutFront is a weekly NBC Out series profiling LGBTQ people who are making a positive difference in the community.

Follow NBC Out on Twitter, Facebook and Instagram