Actually if you take the ACELA from BOS to NY Penn Station, it is easy to get to JFK. Get off ACELA, get on LIRR to Jamaica, then get on Air Train to Terminal 2/3.
LGA and ERW are a different story. ERW you can still get on a train to the Air Train there, but I think you usually have to switch somewhere in NJ, either secacus or newark. LGA is the real gem, know why there is not metro or train to LGA? The taxi unions. That is also why the Air Train only goes to JFK-Jamaica, and not all the way to LGA.