First, let me tell you the basics:

"No SIM card installed" in rectangle over globe when first turned on
Version 3.1.3 (7E18)
Modem firmware 05.12.01
Mac OS 10.5.8
iTunes 9.1

I have tried several times (over the past 3 months since I stupidly upgraded to 3.1.3) to jailbreak but seems to no avail. Just now I have tried to re-jailbreak with redsn0w as per instructions on another thread. Seemed to go OK but then, when I tried to use ultrasn0w to unlock, when I press the Cydia icon all I get is errors (eg. failed to fetch; network error; Index of / NetDBpen nodename nor servname provided, or not known). So it appears that the jailbreak didn't work or work properly.

Should I upgrade to iOS4 through iTunes (do I need to upgrade iTunes too)?

I have waited sooooo long to get my iPhone working (ie. unlocked) and read that when OS4 came out the Dev Team would have solutions for 3.1.3 on the 3G and 3GS. Is my case hopeless? Any advice would be greatly appreciated.