I am not sure which connection you found - the 21:59 Nightjet NJ 402 from Zurich goes directly to Amsterdam (9:58). NJ 402 has some additional cars attached which run as an InterCity, so it might be possible that no bed is available until Frankfurt, and you have to sit in an IC car until Frankfurt and change into the sleeper there, or vice versa.