Jenkins and docker login issue
The error shows that you are using AWS ECR credentials to login to dockerhub which will not work. Dockerhub is a different registry(both public and private), however ECR is private registry only.

For pulling public images from dockerhub there is no need to login to dockerhub. You can simply use docker pull command and it will pull an image from dockerhub registry.

Example: docker pull mongo

However, when you want to pull an image from ECR, you need to first login to the AWS ECR and then only you can pull an image from ECR.