$$y = \log(1 +(k - 1)^2)$$
The domain is all reals and the range is $y \geq 0.$
First, the inverse. Swapping the variables:
$k = \log(1 + (y - 1)^2)\\e^k = 1 + (y - 1)^2\\e^k - 1 = (y - 1)^2\\y = (e^k - 1)^{1/2} + 1$
This inverse has the restriction $x \geq 1.$
But this doesn't match the range of the original function. The range of this inverse function doesn't match the domain (all reals) of the original function either.
Why is this occurring? Don't inverse functions swap the domain for the range, and the range for the domain?
EDIT
To make the function invertible, we shall restrict the domain to $k \geq 1.$ This function now has an inverse.
Your final line ought to be $$y = \pm(e^k - 1)^{1/2} + 1.\tag#$$
Its graph fails the horizontal-line test, so $(\#)$ doesn't represent a function, so the original function actually has no inverse.
EDIT
After you restrict the given function (good idea!), its domain and range indeed becomes its inverse function's range and domain, respectively, as expected. Then there is no longer any issue/contradiction, right?