If the flight arrives into T2/T3, 2 hours should be enough, but no time for relaxing. If it's another terminal, it's more than likely that it will not be enough time - however, DL will accommodate you, and there are about 12 daily JFK-BOS flights (hourly in the evenings I think), so it's not too much wait.