The measure is aimed at countering China’s dominance of commercial shipbuilding and helping to revitalize the American industry.