To tranfer between any terminal at JFK, use the air train which is convenient and FREE!!
There are regular free bus transfers between terminals departing from outside the terminals. They operate 24hrs and depart every 5-15mins and the journey can take anywhere between 5-25mins depending on the destination and how busy it is.