The switch is to far from a pressure tank. The switch needs to be on the line that enters one of the pressure tanks. With multiple tanks, people usually put the switch on a line between the tanks. This is also how the tank manufacturers show to install it but, it is wrong. Pick a tank, and install the switch as close to the inlet of the tank as possible. Then make sure you have the correct amount of air in ALL the tanks.
The chattering switch may have just blown the capacitor, relay, or both in the control box. Have that box fixed or install a new one before looking at the pump. Hopefully the control box will get you back to working. However, chattering or cycling on and off is the worst thing you can do to a pump. If the control box doesn't fix it, then you may also have motor problems.