I just saw your post is unanswered.
There is no way you can make a guitar sound like a Xylophone with Garageband.
However, it's possible to play a xylophone sound in GB, but you will need a MIDI instrument (keyboard or guitar) or use your Mac's keyboard to play it.
Take care... and sorry for the delay!!!