Of those two, the i5-8400 would be better since you have dedicated graphics and won't be utilizing the 2400G's better integrated graphics, though the Ryzen 2400G would normally be in a lower price bracket than that, as it has fewer physical cores.
The Ryzen 2600 (overclocked) and 2600X would be the options most closely competing with the 8400. The 8400 tends to offer slightly better performance in current games than those options, but the 6-core Ryzens also offer SMT (much like an i7) which is likely to help more in future titles, so I would consider any of those to be good options provided they are priced similar.
Your existing processor is still fairly decent though, since per-core CPU performance hasn't improved all that much in...