Just re-read through your configuration description. The inputs on the Scarlett 2i4 are balanced, but you might try switching the input switch to "INST" below the input. Otherwise, you might try building the Cable #14 (make sure the mono plug is connected to the guitar/bass and the balanced 3-pin plug is connected to Scarlett -- you essentially have to disconnect the groud/shield wire on the balanced plug).
One quick thing you could try here is to disconnect the power cord from your laptop and try running a recording session using the laptop battery power only. If this removes the ground-loop hum, you might need a usb galvanic isolation adapter between your laptop and the Scarlett.