Note: This was done in Garage Band 11 version ( 6.0.5), the screenshots below may look different in other versions :
Please launch Garage Band, create new project, select voice, and click choose.
Please name project, click create, mouse click garage band (next to apple logo), and navigate to preferences.
Once in the preferences menu, click the audio/midi tab option, set audio output and audio input to Scarlett 2i2 USB.
Please exit preferences and make sure the i (track view and hide info) in bottom right hand corner of the screen is blue.
Make sure real instrument tab is selected, make sure the browse tab is selected, set your input source to mono 1 (Scarlett 2i2 USB).
Make sure your sound source (guitar, mic, or keyboard) is plugged in to input 1 of your Scarlett 2i2. Turn up the input gain on your 2i2 to a desirable level (make sure halos are not in the red).