Pretty common swap to put in a 350 in a Wrangler. Pretty much buy the harness and adapters and you are set. There are a ton of other engines you can do as well with only getting the harness and adapter.
Always you biggest problem is going to be cooling since after you swap in a V8, there isn't much room. But if it is mainly going to see the street, then you shouldn't have too many cooling problems. Must run into that problem when they are off-roading.
Another option would be to stroke the 4.0L to a 4.6L. I have seen some making 600+ hp. If the 4.0L ever dies in my WJ, I am going to be considering this.