You don't need to check for ischan because you already indicate that in your menu popup. It has to be activated in channel where the client that runs the code is situated. For isnum, and I don't know why you put "1-", you could simply use: if ($2 isnum). Here is my take on your snippet:
menu channel,nicklist {
-
Kick by Nick length:kbl # $$?="Enter length" $$?="Enter reason"
-
}
alias -l kbl {
if ($me isop $1) && ($2 isnum) {
var %x = 1, %n
while ($nick($1,%x,r)) {
%n = $v1
if ($regex(%n,/(.){ $+ $2 $+ }/)) {
kick $1 %n $iif($3,$3-,Banned)
inc %x
}
}
}
}