NOTE ADDED IN PROOF The linearity for Minkowski metric preserving diffeomorphisms is treated here:
Interval preserving transformations are linear in special relativity
However, one may go a step further and ask a better "foundation of SR question": what are the linear/non-linear transformations that preserve wave-fronts, and do they form a group? (it is known that in the foundations of SR light signals are treated as spherical waves propagating at speed "c").
There are two separate issues here:
1. What is the most general form of space-time transformations which leave the D'Alembert equation "conserved":
$$\Box f(x_0,x_1,x_2,x_3) =0 \Rightarrow \Box'f(x'_0,x'_1,x'_2,x'_3) =0) ~\tag{1}$$
2. Do the transformations at point 1., if non-linear, form a group?
Question 2. excludes some (if not all non-linear) solutions to point 1. because non-linearity conflicts with the group property of unique inverse transformation.
Think of (as example) $\text{T:} ~ x'=\sin x^2 + a, y'=y, ~ z'=z, ~ t'= \sqrt{t^2 + 75}$. This may be a solution to problem 1., but you cannot invert it, therefore is not something the OP may seek.
If we remove from the OP the condition of being a group, then question 1. is really interesting in itself and a solution has been offered by Weyl (quoted by V.A. Fock in Appendix A of his relativity book: The theory of space, time and gravitation, Pergamon Press, 1959, +---).
Answer to 1.
The form of the most general transformation $x'_i= f_i(x_0, x_1, x_2, x_3), ~ (i=0,1,2,3)$ satisfying $(1)$ is either:
$$ x'_i =\frac{x_i - \alpha_i \sum_{k=0}^{3} e_k x_k^2}{1-2 \sum_{k=0}^3 e_k \alpha_k x_k + \sum_{k=0}^{3} e_k \alpha_k^2 \sum_{l=0}^{3} e_l x_l^2 } \tag{2}$$
or
$$ x'_i = a_i + \sum_{k=0}^{3} e_k a_{ik} x_k, \tag{3} $$
with $a_{ik}$ satisfying
$$ \sum_{i=0}^{3} e_i a_{ik}a_{il} = e_k \delta_{kl} \tag{4}$$
with $a, e, \alpha$ constants with respect to $x_i$.
$(3) + (4)$ are called Lorentz transformations and they do form a group, while the (2) are called Möbius (spherical) transformations and unfortunately do no form a group.