A couple more tests you can run.
Hook a jumper from the small terminal on the solenoid to battery negative.
If it cranks, you have a bad wire or connection to track down.
If it still chatters, check all of the connections. Not just the part of the terminal under the screw or nut, but also check the connection of the terminal to the wire.
If all of this is to no avail then it is more likely to be a bad solenoid.