The problem for 1940 to work is that FDR would have to let his political guard down, which is near-ASB. Roosevelt always saw Kennedy as overambitious and disloyal no matter what he said.
Here's a scenario that could work: Garner and Jim Farley form a separate Democratic ticket in 1940, FDR takes JPK as Vice President to shore up the crucial Catholic vote and keep the fundraising levels up. FDR wins again, but by a much smaller margin than OTL. FDR/JPK win in 1944, and FDR dies in April 1945 on schedule. Kennedy is now President.
Now as to what happens to his sons, that's a different matter. Quite conceivably, as the Vice President's son, JPK Jr. can get recalled before the OTL suicide mission. JFK can die instead of Joe Jr. Either way, the family dynamic is altered considerably. If both live, then one or more of them have to remain in the "civilian" (non-political) world. As to what they do, that's another question. Jack was interested in journalism (all the brothers worked as stringers at various points, as did Kathleen), so that could be interesting but ultimately a dead end. Business is out for obvious reasons. So that leaves law. That would likely be Bobby, who if he applied himself with customary diligence and single-mindedness, could make quite a name for himself in that field. Ted would be off the radar for quite a while.
If Joe Jr. lives and JFK dies, that means RFK goes into the OTL assistant role. Joe had the same vices as Jack did (without the health issues though), in roughly similar quantities. Expect problems between the two, and a more mixed relationship. Joe Jr. is less sensitive than Jack, and very much his father's son as an anti-Semite. If there are problems between the two, it could get ugly. Bobby could pummel any of his siblings by his early 20s except Joe Jr.