Bank of America NA prevented homeowners from receiving mortgage-loan modifications under a federal program in order to avoid millions of dollars in losses while benefitting from financial incentives for participating in the program, according to a complaint unsealed in federal court Wednesday.