The short answer
Heavy bomber aircrew probably faced the highest chance of being killed of any large group in the war, based on the commonly cited figures. Aircrew in RAF Bomber Command are the usual example. Infantry, though, suffered the most deaths overall, because armies had so many of them. Which job counts as the deadliest depends on how you measure danger.
Why the answer depends on the measure
Total deaths and death rates tell different stories. A group with millions of members can suffer more deaths than a much smaller group with a far higher loss rate. A fairer comparison is the share of people in a role who were killed, measured against the number who served in it. On that measure, aircrew and submariners stand out.
Bomber aircrew
RAF Bomber Command flew night raids over Germany and occupied Europe, in aircraft that had limited protection against flak and night fighters. The commonly cited figures are about 55,500 aircrew killed out of roughly 125,000 who served in its aircrews. That is a loss rate of a little under half. These are approximate figures, and different sources give slightly different numbers.
Submarine crews
Submarine crews also suffered very heavy losses. US submariners lost roughly one in five of the men who served in the submarine force. German U-boat crews suffered losses that are often put at around 70 percent.
Infantry and tank crews
Infantry suffered the largest number of casualties in total, since so many men served in the front-line infantry of every army. Tank crews faced fire, explosions and fuel fires, and a single hit could kill everyone inside.
Merchant seamen
Merchant navy crews carried supplies across the Atlantic and other sea routes, and many were lost to U-boats and aircraft. Their losses were heavy in proportion to their numbers, which is one reason the merchant navy is often mentioned in discussions of wartime danger.
Where women fit
Women were rarely in these roles. Most women in uniform served in clerical, signals, medical and transport jobs. The exceptions were mostly in the Soviet forces, where women flew combat missions and served as snipers. For the range of roles women took on, see what did female soldiers do in WWII.