In a ruling on Monday, a federal judge said the fee was a tax that Trump did not have the authority to impose.