Elidien - most classes can be played as either melee or ranged, it is the moderate survivability that would seem to be the key. If your only attempts have been Elementalist and Engineer, you picked the two that are in my opinion the most difficult to play.
Keeping in mind that this is just my opinion, that "survivability" can mean different things to different people, and that a good build often requires at least level 40, sometimes 60, here is a list that may be helpful:
Warrior - most resilient class that I have found. High health, high armor, good condition removal. Shines in melee, ranged is mainly single target, with limited AoE range.
Necro - High health (two health bars), low armor, no better class for condition removal. Solid melee, one of the best for AoE ranged. Pets are optional, and not frequently seen (except for SPvP and is one of several options).
Guardian - Low health, high armor, good condition clear. In spite of the low health pool, Guardian can be a fairly tanky class. Gaurdians are built around active defense, past the dodges that the other classes have. They also have access to many boons that improve their, and their parties performance. Shines in melee, relatively heavy hitting single target ranged, and option for somewhat weak AoE ranged.
Ranger - Good survivability, condition clear, melee, & ranged options. I think of ranger as the jack of all trades, master of none. They require pets, though.
Mesmer - Mesmer's are light armor, and do not have a terribly high health pool. They have good melee and ranged options. They rely on distortion, evades, invisibility, and teleports for their survivability. I tend to have more health issues on mesmers than I do on the classes listed above. When my timing is off, Guardian survavibility is close to my mesmer. I am not an expert with either, by any means.
Thief - this is a glass cannon class. They rely on teleports, evades, blinds and invisibility for survival.
Elementalist - lots of survivability options, depending on what you are doing. Lots of condition clearing, and healing options. I have not mastered the attunement swapping. I started my ele last, and I think I am too used to the weapon swapping on the other classes to be comfortable with the attunements. Those attunements can be very powerful, however. A good ele can 1v1 just about any other class. Dagger/Dagger ele is considered to be a cheese build by more than a few in PvP.
Engineer - Engineer takes quite a bit of thought to play. Many, many options, as far as weapon sets go. The tool kits allow for ranged AoE, melee and survability. The problem is that each kit is essentially a new weapon set, and keeping track of the skills available takes a bit to pick up. Engineer is middle of the pack for survivability, at least for me.
All that said, a couple of general points. GW2 does not rely on, or even allow for, a trinity. All classes are DPS and rely on dodges for survival. Because of this, most of the builds are glass cannon. It is all about damage. I found that I needed, and on some classes still need, more health or toughness, when learning a class. That said, power, precision, and ferocity are king. One of the challenges that I have found with the DPS only philosophy is that I need access to almost all of the traits and skills for each class, to find a build that works for me. Unfortunately, that means that I needed a fair amount of play time after max level to get access to what I needed to be comfortable playing a class.
My recommendation to you, is Necro. Necros are relatively straight forward to learn, they have good ranged options, and with a dagger, and the blood trait line, survive in melee. Necros do lack gap closers and have limited CC options, though. Warrior is solid too, and can be so easy to play that I find them somewhat boring (I still actively play one though).
Hope this helps!