Get to grips with quantisation
The automatic correction of timing is quantisation. Garageband has a useful
‘Time Quantise’ tool that achieves this for audio and MIDI regions alike. Found under the Region tab of the Audio Editor inspector, it uses a slider control to set the strength. In addition you can also choose a note value to base the quantisation on from the popup menu. This method works especially well when a region or loop maybe has all the right notes but without fitting the project tempo very closely.