+1 @cleeds
There’s no case to be made for a router being co-located next to your audio gear as having any benefit compared to say 30’ away if we are talking about a wired connection.
On the other hand, picking up noise from the internal CPU and power supply is possible. I admit to having an Ethernet switch behind my rack, but given the number of devices I have it’s pretty unavoidable. Is it better? Only because of the convenience of attaching my TV, DVD, receiver and music streamers together with short Ethernet cables.
My router on the other hand is located for the convenience of the cable modem and data closet, far away.