@Listener
public void join(ClientConnectionEvent.Join event, @Getter("getTargetEntity") Player player){
player.kick(Text.of("kicked"));
}
[minecraft/DedicatedServer]: Eric12324 joined the game
[minecraft/NetHandlerPlayServer]: Eric12324 lost connection: kicked
[minecraft/DedicatedServer]: Eric12324 left the game
So the login event is fired just before the player fully joins. The Player object is created yet not fully ready. Therefore (as Eric12324 said) use the Join event
Login is the better place to do it though. All you need to do is cancel the event and, if you want a custom message, use setMessage on the Login event…