Hmm difficult choice. Ryzen needs a new motherboard and really 2400mhz RAM is too slow so you would want to upgrade that to get the full potential. Ryzen is significantly impacted by RAM speed unlike Intel. The 7700 is a decent step up but not sure how long it will last before you want to upgrade again. The 7700 is just behind an i5 8600/9600 and these i5’s are already being pushed hard in a few cpu heavy games when running high FPS.
If You need upgrade and don't want to spend 500$ on new setup, just stay with what You have and try to sell Your i5. If You succeed, buy 6700K on it's place, install some decent cooling and overclock it. You'll be fine