MassHousing has closed on $29.7 million in affordable housing financing to the nonprofit NeighborWorks Housing Solutions for the construction of 94 new affordable apartment homes adjacent to Brockton’s Campello Commuter Rail station.