All Glocks are legal in Mass (with the exception of most full auto Glock 18s). If you can find it for sale in the state, you can buy it and own it.
You have "legal" confused with "compliant". Glocks made after 1998 are not Mass
compliant and therefore cannot be transferred by a Massachusetts
dealer.
However, you can obtain a "post-ban" Glock via private sale with a non-dealer within the state. For example, if I moved here from NH with a brand new Glock 33, I could sell it to you face-to-face on an FA-10 and you could own it. But, if I sold it to a dealer, he couldn't transfer it to someone in the state.
The only thing that can be illegal WRT Glocks are the magazines. Post ban magazines with >10 round capacity are illegal in Mass. Here's a
thread on how to pick them out.
The shops that Reptile posted are excellent places to start (and probably end) your search.