Take a taxi, cost will be about $35 + tip and much easier. You could take the subway to Astoria but it would involve at least two transfers along the way; E subway from Jamaica to the #7 at Jackson Hts./Roosevelt Ave. to Queensboro Plaza transfer there to the N or W to Astoria/Ditmars Blvd.
Take a taxi, cost will be