Cheapest is by Airtrain/subway/bus: take Airtrain from your terminal to Jamaica Station, take E subway to Jackson Hts/Roosevelt Ave., transfer to the Manhattan-bound #7 subway (NOT the #7 "diamond" express, it will bypass local stations) and get off at 46th/Bliss St. From there take the Greenpoint-bound B24 (runs along Greenpoint Ave.) bus to your destination. Taxi will cost you about $40 but is faster.
Cheapest is by