President Trump moved late Friday to exclude most transgender persons from signing up for the U.S. military, after his defense and homeland security chiefs said they were worried about the armed forces’ ability to handle the different challenges the troops would bring. The decision replaces Mr. Trump’s earlier ban, announced last summer, with a more thoroughly…