Kinetic modeling of a sheath layer in a magnetized collisionless plasma