The president is using his authority granted through the Alien Enemies Act of 1798 to deport foreigners. However, the Alien Enemies Act states that it can only be used when the United States has declared war against a foreign nation or government, or when the United States has been invaded by a foreign nation or government.
Problem is that Tren de Aragua is not a nation or government. Trump tries to justify TdA being a government by suggesting that the Venezuelan government has ties with a different drug cartel which coordinates with Tren de Aragua to flood the US with drugs. All that somehow means that Venezuela is ordering TdA to invade the US, so it is legal to arrest all TdA members in the US and deport them.
His justification does not make any fucking sense. Tren de Aragua is not acting on behalf of Nicholas Maduro to destabilize the US. They are here, abusing loopholes in the immigration system, to sell drugs and engage in criminal behavior.
Therefore, Trump has no way to use the power of the Alien Enemies Act to deport these criminals. There could be another way, perhaps by Congress passing a law that allows him to extradite known members of foreign criminal organizations. He could order the Department of Justice to prioritize the conviction of illegal aliens, provide state and local officials more resources to speed up prosecutions.
There’s a lot that he could do with his power as the Executive, but the power invested in him through Alien Enemies Act is not one of them in this situation.