and welcome to the forum!!
Without trying it hands-on, it's difficult to be certain. But if I'm going with what you say, and "most of the time it just twitches and can't seem to focus", then chances are that the lens is faulty.
Auto-focus is a collaboration between the camera and the lens. Everyone has occasional trouble with AF under certain circumstances - for example in low light and in low-contrast settings. Under such circumstances it's not uncommon to have to try a few times to get it right. But it is usually possible to resolve.
Your lens has a minimum focus distance of 22cm - if you go below that, don't expect it to be able to auto-focus. But you are saying that AF works well at shorter ranges, so that is probably not your challenge.
Sigma produce excellent lenses at very competitive prices. But one of the reasons why they haven't taken over the market is their occasionally faulty quality assurance. Many members here have ha to send back Sigma lenses for adjustments more than once! But when they work as intended, they offer great performance at a really good price.
If you have purchased this lens at a reputable dealer, they should be willing to replace it with another sample instantly, while they send your sample back to Sigma.
Good luck - I hope you get it resolved before your trip!