You want the "Jamaica" or "Howard Beach" AirTrain. In both those cases, T5 is the next stop. Don't take the "All Terminals" line, or T5 won't be for a while.
Also, don't forget to claim your bags at T4. You can drop them off again at the B6 counter in T4 just after customs.