Four hundred homes at risk from erosion and flooding are to be protected by the creation of a giant sand dune on the Norfolk coast.