I honestly couldn't choose between the two.
The standard D-18 is probably my favourite Martin (tied with certain D-28 models - the one I own
and the one I'm about to buy). It's just a workhorse of a guitar, for strumming it can't be beat by any Martin dreadnought in my opinion.
The J-45 is my favourite Gibson. For strumming again, I don't think there's a better Gibson model.
I don't particularly like either of them for fingerpicking, but for flatpicking they shine (although the scalloped D-18 models are probably better for this job)
I would say the D-18 has a more woody tone, whilst the J-45 has more of a growly chime to it's sound. If you want to replicate the sound of most Alt country/Americana albums, both guitars are completely necessary purchases.