Massachusetts and Maine have been selected as two of 16 states to receive a portion of $125 million in grants.