IMO/IME ... I do believe it to be true, however there are so many other variables that come into play. 2-1, being able to tell the difference, with just your ears, will be difficult to narrow it down to just that. Add to that, the fact/idea, that even two basses made by the same company, with the same woods, etc., won't sound exactly the same.
Not to get all Billy Nye the Science Guy ... to answer the question; one must look at how the two types of basses are constructed.
... A Neck-through bass is basically one long neck, with the body comprised of "wings" added on. The vibrations that travel between the fretted string, and the Bridge; there is no dampened/deadening point on a Neck-through bass. Thus, giving the bass more sustain.
... A Bolt-on is comprised to two elements; the neck and the body. The vibrations that travel between the neck and the bridge, are dampened/deadened at the neck joint. Eventhough the neck is "bolted" onto the body, there are gaps between the neck and the body ... which dampens/deadens the vibrations ... giving the bass less sustain. The two elements, the neck and the body, both vibrate together, but a bit more seperate than that of a "neck-through" which also contributes to a "punchier" tone.
(Flame On
)
With that said ... I must say, I prefer Bolt-on. For the most part, I do find them to have a bit less sustain
(however I've owned some Bunker/PBC basses that have sustain for days! but they're engineered to be that way). Bolt-on's do seem to be a bit "punchier" with a bit more mid range. Also if something happens to the neck, depending on the bass, it'll be much easier to replace, and possibly a bit cheaper than a repair, if it can be repaired.