Its source code doesn't seem to have been changed in years.
There's a bug in bugs.kde.org asking to port it, but its status is "unconfirmed": Bug 167910 - Port KSokoban to KDE4. In that bug is mentioned that KSokoban was being worked on, with the name Magazynier, but I guess it was never released. I couldn't find anything with that name in the repos, and its source code hasn't been touched in more than 2 years. A search for magazynier in projects.kde.org shows no results. In this thread the author says:
Well, magazynier, which is a sokoban game for KDE4, has a chance to be included in KDE SC 4.5, though it still
needs some work.
Other than that, there are some mailing list and forum threads that mention it, saying that there is no KSokoban in KDE4.
The project ksokoban in SourceForge, mentioned by @vasa1 in a comment, says it "requires KDE4 and Qt4", but its only file release as of now is a Windows program.
I thought I'll try to rewrite it for KDE 4 myself. Here is the result. (This is probably a terrible way of distributing it, but I have no idea how to go about packaging, and most of the tutorials/documentation I found online was not helpful.)
Apparently, KSokoban hasn't been ported to KDE4. Searching in kde.org I could find a few things:
The KDE (Legacy) Games Center says:
That's the only mention to the game in games.kde.org.
Its source code doesn't seem to have been changed in years.
There's a bug in bugs.kde.org asking to port it, but its status is "unconfirmed": Bug 167910 - Port KSokoban to KDE4. In that bug is mentioned that KSokoban was being worked on, with the name Magazynier, but I guess it was never released. I couldn't find anything with that name in the repos, and its source code hasn't been touched in more than 2 years. A search for magazynier in projects.kde.org shows no results. In this thread the author says:
But that seems to be the last.
Other bugs for ksokoban are closed with unmaintained status.
Other than that, there are some mailing list and forum threads that mention it, saying that there is no KSokoban in KDE4.
The project ksokoban in SourceForge, mentioned by @vasa1 in a comment, says it "requires KDE4 and Qt4", but its only file release as of now is a Windows program.
KSokoban is referred to as Magic Sokoban in Ubuntu 11.10, 12.04 and 12.10.
I thought I'll try to rewrite it for KDE 4 myself. Here is the result. (This is probably a terrible way of distributing it, but I have no idea how to go about packaging, and most of the tutorials/documentation I found online was not helpful.)
While ksokoban might not be available, SokoMind is a very similar replacement: