It's not just a military response, but also federalizing the police force. He can go after both the homeless encampments and the gangs. This is appropriate because:
1) Americans deserve a capital city that's at least as safe and orderly as similarly affluent cities like Austin or San Diego, which have homicide rates one-third or one-quarter as high as D.C. over the last decade--even excluding the COVID-era spike in homicides.
2) The orderliness of a city is primarily an issue of policing and incarceration. You don't need to pass national gun control, or address "root causes"--just take gang members off the streets and put them in prison.
3) The problem isn't unique to D.C., but D.C. is an outlier because (a) the aesthetics of D.C. are important because it's the nation's capital; and (b) Trump has express statutory authority to federalize the D.C. police force under the DC Home Rule Act. DC thus can serve as a testbed for Republican policing in a major city, most of which won't elect Republican mayors.