SAN PEDRO, Calif. — The Coast Guard’s top officer laid out a “dedicated campaign” on Thursday to improve diversity in a military branch that has long struggled to recruit women and minorities, weeks after the service was shaken by the arrest of a lieutenant and self-described white nationalist accused of plotting terrorist attacks from its headquarters.

Adm. Karl L. Schultz, speaking in his first State of the Coast Guard address since being named the service’s 26th commandant in June, later acknowledged that the goal to make the service more inclusive would be challenging after the Defense Department issued a policy that will force future transgender members of the military to identify as their biological sex.

“We’re going to treat everybody with respect. There’s some changes that come with this policy, and we’re bound to follow that policy,” Admiral Schultz said at the Coast Guard Los Angeles-Long Beach Base before scores of Coast Guard and California law enforcement officials. “There’s some that feel, ‘Hey, you’re breaking ranks with the transgender community.’ I would say, we’ll see how it goes.”

He also faces a major challenge on other diversity fronts: Out of its 41,159 members, just 14.6 percent are women, 13.7 percent are Hispanic and 5.9 percent are African-American.