The president said the planned duties were a response to China’s failure to curb fentanyl exports.