Is your current one OEM or is it a custom built? I ask because it could have a better upgrade path. Potentially you could update the BIOS to support Kaby Lake. Then replace the G4400 with a $60 Pentium G4560. After which you could recoup some money by selling the G4400. Which you will be able to package in a box with heatsink. The G4560 provides i3 performance for considerably less.
http://pcpartpicker.com/product/8gKhP6/intel-pentium-g4560-35ghz-dual-core-processor-bx80677g4560
If it is OEM. Odds are less likely they provided a BIOS update for Kaby Lake. In which case you'll be looking at a more expensive and slightly faster Core i3-6100.
As for how the i3-3240 and G4400 compare. They are too close to matter. In some tasks the G4400 is faster in others the 3240 is faster. However, the G4400 has a superior upgrade path. So I'd stick with it. Unless that i3-3240 has a top of the line Z77 chipset motherboard and the G4400 has the lowest, cheapest, POS H110 chipset.