Transit – From JFK to Newark. Alternatives of time and transport

I'm traveling from Indianapolis to JFK and then I need to go to Newark to take another plane.

I have booked the 2 flights independently. If everything goes according to schedule, I will be at JFK at 4 pm on December 12. My flight from Newark departs at 11:55 pm, so I guess I should be there by 10 -10: 30 or earlier.

Is this enough time? It may sound silly, but I have no idea of ​​New York City and I'm afraid I'll get stuck in a traffic jam (are the roads busy during these hours?).

Then this raises a second question. How can I go from JFK to Newark?

What is the fastest, cheapest and (most important) route to follow?

Under the circumstances, what would you suggest?

How to transfer from JFK to Newark using public transportation?

Options for transferring JFK to EWR

I read these two, the first for public transport, but the second type made me have doubts about the gap I have between flights.

Hope someone can help me…