Take the NYAS bus ($15) from any terminal to Penn Station. Then take Amtrak train to Boston which terminates at South Station. Both Megabus and Boltbus also go to Boston (around $20, way cheaper than Amtrak) leaving from just outside Penn Station but not sure where they will drop you off in Boston.
Take the NYAS bus ($15) from