Prime Minister Boris Johnson has backed a campaign to stop the closure of docks where hundreds of skilled jobs are at risk.