To change the input and output source within Garageband, go to Garageband>Preferences> Then ensure that the relevant devices are in use. In this case, the Scarlett 2i2 has been chosen as the input/output device.
To select or change which channel records into Garageband, create a new track and a dialogue box will appear. Select one of the two options under Audio based on what you are recording.
Then by clicking the dropdown box “Input 1” (highlighted) you will be able to select the relevant input.
Then click Create.
Alternatively, if you are using an Audio track you can change I/O settings by clicking the Smart Controls (top left corner), then click the Show Inspector button (highlighted bottom left corner) and select the appropriate Input from the Input pop up menu.