To be honest, it's also the quality of migrants that Sweden receives. The migrants joining gangs or getting radicalized in Sweden are primarily ones who arrived as asylum seekers, usually without much language and marketable job market skills, and with conservative cultural background that can be a burden. This is a big contract to the United States, which doesn't receive anywhere near as many refugees (adjusted to its size), and is generally more picky about migrants.
The welfare system doesn't work well with integration either. If all that is available to you are bad jobs due to your lack of job market / language skills, why work if welfare pays almost the same?
I think Sweden does a decent job integrating those migrants who arrive with sufficient skills for the job market. It's the rest that are problematic, and they would probably do better in the US with its lack of welfare state.