When we hear an excellent soloist/improviser play, it sounds to the listener like it is being beamed from the gods and we marvel at it. But the musician isn't making the music up whole cloth. The musician is playing within a framework, and that framework includes: the thousand times they have played this exact song before; the hundreds of other songs like it (similar key, similar changes); the underlying expectations of the "style" (bebop, funk, blues, etc...) that the musician has been listening to and playing for years; and so on. The point is that the novice musician sits down to improvise and expects to be able to make up such a solo from whole cloth. The expert can make it up from whole cloth, why can't we? But the expert isn't making it up from whole cloth, and we can't make it up because we lack the foundation that the expert has.
I am far, far from an very good soloist, but I have gotten to the point in playing blues solos that people sometimes compliment me about them. When that happens, I think to myself, "Gosh, I don't know what they mean. All I'm doing is playing minor pentatonic, with occasionally (very!) embellishing with Aeolian or Dorian. I have, like five different licks that I throw in that sound impressive. I almost never shift positions on the neck. I never do double-stops. I never pre-bend notes. I am completely incompetent at mixing rhythm and lead together..." and it goes on.
The point I'm getting at is that improvising is not pure creativity, beamed from the gods. It is an incredibly sophisticated musical skill that builds on many, many smaller skills. In the same way that the novice listeners hear my amateurish soloing and are impressed because they don't know about the underlying structure and techniques that I'm using (and failing to use), we have the same experience with musicians who are so far above our level. But it doesn't mean that those musicians aren't using structure and techniques.
What has worked the best for improving my soloing is studying others' solos and learning to play them. With jazz, it seems like it would be especially important to first be very familiar with the chord structure of the song, then study and play the solo, to see how it interrelates. You will slowly start to pick things up, to the point where you will be able to incorporate them into your own playing. One day, somebody will say to you, "Wow! That line sounds great!" And you'll think, "Oh, gosh. That's just a secondary dominant substitution. Nothing impressive at all."