Do Y levels affect on how far you are from that slime chunk? For example my slime farm is at y 37 and I go up to y 50 at the same spot using ladders, does it mean I'm 13 blocks away from the chunk or I'm still 0 blocks away from the chunk?
you'd still be in the same chunk but you'd be at least 13 blocks from the spawning platform, which is what counts for spawning.
(That is too close for slimes to spawn of course, you'd want to go up to level 62 or so so you're at least 24 blocks away.)
Chunks include every axis. If you were in a chunk at, say, X = -256, Y = 53, Z = -256, you would still be in the chunk if you went down to Y = 13 for diamonds.