My friend, I know your new in this forum but please read through all iphone forum here because even the iphone 3Gs 4.0 ( new boot rom ) cannot be unlock as of the moment so do not expect 3Gs 4.0.1 will be ready for you in few minutes!
Getting doesn't help ... the solution is already provided by other members
of this forum ... so put in some effort ... that only bear some fruit .. best regards ..
all can find any guide you want in this post.. It's really useful
BIG ARTICLE: Jailbreak and Unlock all Devices [iPhone, iPod, iPad] - [iOS 4.x, iOS 3.1.x] - Ultrasn0w