It has not been explicitly stated that the $U_i$ are independent. We assume they are.
Let $1\le z\le N$. The probability that $Z\le z$ is the probability all the $U_i$ are $\le z$. This is $\left(\frac{z}{N}\right)^n$. So the expressions for (left and right) tail probabilities are quite simple.
The distribution function of $Z$ readily follows. We have $Z=z$ iff $Z\le z$ and it is not the case that $Z\le z-1$. This has probability $\left(\frac{z}{N}\right)^n-\left(\frac{z-1}{N}\right)^n$.
Added: In comments, we are asked about asymptotic estimates for mean and variance. Let $F(z)=(z/N)^n$. Then the mean is
$$1(F(1)-F(0))+2(F(2)-F(1))+3(F(3)-F(2))+\cdots +N(F(N)-F(N-1)).$$
There is a lot of cancellation. Since $F(0)=0$, we find that
$$E[Z] = - F(1) - \dots -F(N-1) + NF(N)$$
And recalling the expression for $F(z)$ we find:
$$E[Z] = N - (\frac{N-1}{N})^n - \dots - (\frac{1}{N})^n$$
Which converged to $N$ as n goes towards infinity, showing that $max(U_i)$ is an unbiased estimator for N
You will notice that unlike its continuous counterpart where $X \sim unif[0 , \theta]$, $max(X_i)$ is not unbiased, and you can find that $\frac{n+1}{n}[max(X_i)]$ is unbiased for a sample size of n. Indeed, intuitively this makes sense, given that in the continuous case, $max(X_i)$ does not reach $\theta$ with probability 1, hence needs a nudge upwards. In the discrete case, $max(U_i)$ reaches N with probability 1, hence will not need some nudge to reach the value it is attempting to estimate.