As you haven't been through JFK before, can I suggest that you read this comprehensive "sticky thread" right at the top of the front page of the forum - no search needed:
http://www.flyertalk.com/forum/new-y...st-really.html
The third post of that thread has this JFK transfers thread:
http://www.flyertalk.com/forum/new-y...solidated.html
It sounds like you are on separate PNRs, which means B6 may off-load you if you're not at the gate at the appropriate time.
Assuming your inbound flight is on-time, with Global Entry, you should be able to make the connection. No time for stopping in the lounge.