This is actually a subject I've had a lot of discussions with my RPGing friends with over the years.
My observation I have about players is that they do things that they're incentivized to do. They don't do things that are high-risk unless the rewards are commiserate to the risk. While martyr-heroism (self-sacrifice) is a widely admired kind of heroism in real life (the person who saves people from a freezing river but ends up dying themselves), for the same reason why it's so widely admired IRL, players in RPGs rarely do it.
I also believe that most editions of Traveller are anti-heroic. As you pointed out yourself, Traveller is deadly. In fact, many GMs are strangely proud of the fact that Traveller can kill off players left and right, even during chargen. Traveller tends to produce, cautious, opportunistic, and often morally ambiguous characters because those traits are the ones that most often lead to success in Traveller; the game system has been chided for a long time in the RPG community about scenarios that revolve around immoral work to get ahead (Loren Wiseman comments about it in GURPS Traveller, in fact). Such games rarely produce heroism.
If, as a GM, you've ever thought "it's right for that character to die, he/she did something stupid" ... you're probably asking too much to have heroism. Heroism is subjective; players don't want to try something heroic and get slapped down by the GM because the GM thinks what they're doing is "unnecessary" or "stupid." Beyond martyr-heroism, one of the traits of heroism is "stupidity that someone got away with" - if you read many accounts of heroism, it's essentially someone doing something that would otherwise be insanely risky or outright suicidal for some noble end (usually for the sake of someone else, often a stranger) ... and getting away with it. As an example, in a simulationist and deadly system, running out to drag an injured comrade under fire from the enemy is simply stupid; you lose all of your cover bonuses, then you take a movement penalty once you grab your comrade, you may even grant the enemies to-hit bonuses for providing a slower and larger target. Then if you get hit, you're likely to suffer catastrophic damage and die. None of this even takes into account the natural tendency for games to ramp up difficulty levels of tasks in situations like this and tasks quickly require ludicrous target numbers like multiple checks that require 8+ on 2d6 even after factoring in skills. This clearly isn't a situation that a system encourages; multiple points of (likely) failure and high penalties for failure -- the system is telling you not to do it. You can't blame players for not doing it.
With that definition in mind, I think you'd have to adopt new rules that circumvent Traveller's heroism-discouraging system to incentivize heroism.
Not all RPG systems are anti-heroic; some of the more recent "story" based RPG systems incentivize heroism. None of these systems are perfect; some are prone to abuse, many lack the simulationism that Traveller GMs seem to like. But without some incentive and deadly penalties to being "stupid", most players will always take the safe route. Such alternative systems are worth checking out and trying. Even without adopting them, it is possible to adopt rules or concepts from these games to use in your games.
"Fate" points are a common method. A kind of "currency" they're spent to grant an automatic success to tasks or bump up a success rating of a task. Fate points may be regenerating (you get three per session and are lost if you don't spend them - this discourages hoarding) or they may be granted for doing certain things and saved (perhaps players get five to start with and gain more at the GM's discretion, perhaps one more per successful adventure). A particular twist on this system I've recently been investigating is the idea that several players working in concert to do some heroic end grant bonuses that a single player doesn't get or they get a larger payout.
"Causes" is another method I've seen. Players may optionally make a kind of "things I believe in" type code for their character. This should only be a few things (for instance, up to three or five) and the character does not need to have them. The GM should review these. You don't want too many or else it'll interfere too greatly with the character's freedom to roleplay. You also don't want causes that conflict with another character's, at least not without careful thought to the likely game-destroying consequences. When a character does actions further this morality or to protect threats to it, they get bonuses to task rolls in the form of large bonuses, inability to fail/fumble, etc. If they further or protect their cause during a session, they also gain things like extra experience, fate points, and so on. If they see a threat to their cause or a way to further their cause and don't take, they suffer penalties for their inaction in the form of skill penalties for that session, loss of fate points, and so on (some systems might force "willpower" roll to prevent the player from acting and I understand the reasoning but I dislike systems that take control characters like that and avoid rules like that as much as possible).
"Karma" is a thing where if your character dies in furthering cause or doing something heroic, they get a sizable bonus on their next character for dying for their principles. For a Traveller character, this may be in the form of a sizable number of "choose your rolls" during the next character's chargen ("you need a 7 to get that? yep, imagine that you got a 7"), bonuses to stats, and additional rolls on the mustering out tables. This removes some of the sting of losing a character.