I think you'll get a taxi from LaGuardia Airport to JFK, it's close. It will take 15min or max 20 min. It is not far and a taxi is more suitable. I will inquire and answer you ok. I received a message that said yes, there is a shuttle, a bus that connects the 2 airports. In your place I will take a taxi. Another answer said that there is a shuttle that goes to terminals B, C and D.
2 hours is very short time period to rely on a subtle bus service. If you take into account grabbing your luggage when you land and check in your luggage on the next airport plus the security line you might wanna consider taking a taxi it's more money but it will get you there in time
Thanks! Your answer is awaiting moderation.