So, you're looking for the length of the
AudioStream that your
AudioStreamPlayer is currently playing?
If so, in GDScript that'd be...
If, instead, you're looking for the time remaining in the currently playing stream, I guess you could get that with a combination of the above (the total duration) and this:
$AudioStreamPlayer.get_playback_position() which returns the current time into playing track.