It doesnt sound like the sim. It is locked onto a carriers network. You have to get that carrier to network unlock it. If you bought it online then that means they never got it unlocked. You could also try a sim card from that specific carrier and hope that it is not blacklisted. Check the imei online and see if it is blacklisted.
It's not getting power possibly. You have to try and determine if its the connections that go to the power button on the device or if the battery is going bad. If you have a multimeter you can check to see if it is outputting the correct volts. It could also be the motherboard but at that point its sometimes not worth it
I'm confused. So just a recap - You know your code - The computer recognizes the device - You can hook up to itunes Itunes should just be able to unlock it if you still have a workable screen. Just go to a repair shop and have them temporarily put on a screen and ask if they can transfer the data to your computer for a small fee or is there some other issue that does not let you do that?