The Coast Guard said Thursday it will spend $400 million to demolish obsolete barracks and build new sleeping, dining, training and other facilities at its historic training center in Cape May, N.J.