you will need to use redsn0w and it's a very easy app and should be done within a couple mins with no need to wipe the phone.
to jailbreak the 2g at 3.1.3 you will need the 3.1.2 ipsw file to use with redsn0w and of course your 2g will need to be at 3.1.3, you will also get an option within redsn0w to unlock