SSH & SFTP Issue

This is a task on KodeKloud Engineer where I am supposed to configure SFTP connection for a user and disable access to SSH. I took the following steps but it still says: - user ‘siva’ was able to SSH into App Server 2, however user should only be allowed to make SFTP connection.

I created the user with the given password
I created the chroot directory /var/www/data and assigned root:root to /var/www then siva:siva to /var/www/data
I assigned permission 755 to /var/www and 700 to /var/www/data
I edited the /etc/ssh/sshd_config file by adding the following lines:
Match User siva
ChrootDirectory /var/www/data
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
PasswordAuthentication yes
AllowAgentForwarding no
PermitTTY no

Then i restarted the SSHD service. Kindly assist me in checking why i am still having issues with the task.