When you want to create a Ringtone in GarageBand, start from the "Ringtone" template, when you create a new project with "File > New > Project" in GarageBand.
Add an audio file to an audio track, trim it to be shorter than 30 seconds (or 40 seconds, if you really want such a long ringtone), then use "Share > Ringtone to iTunes" to save the ringtone. The audio file added to iTunes will have the filename extension "m4r" and not "m4a" like the other iTunes songs. It will appear in the "Tones" section of the iTunes Library and you can sync it to iPhone like other songs.
http://tonerack.com/iphone-ringtone-format-explained/