You should be fine once all flights are on time. Three and a half hours would mean from arrival at the airport for check in, security and pre clearance. As you won’t be doing the first two, just heading through flight connections and on to preclearance, two hours should be fine. Same from JFK to CDG. Just through flight connections to next gate. If all flights are on time then it should be grand.