I need to select the image from a predefined dataset that are the closest to the input, is this possible or do I even need to use ML/AI?
You will only need to use ML or AI if 
a) the dataset is very big.
b) It is difficult to get the meaning or value of the image.(ex: group of ants, photos of stars in night sky)
And many more.

Below is the way I thought it can be done through a machine(with deeplearning, CNN)
1. Train the model
        arrange the images in dataset into clusters (the number of clusters can 
        be decided based on the criticality of the application, more critical the 
        application more should be the number of clusters) .


Predict about input 
    Then predict the nearest image in the dataset to the provided image.


I recently listened a podcast in which, a problem is approached similarly. The podcast is about youtube predictions and the result is to provide closest video from the youtube videos ( here the dataset).Below is the podcast.
    ( https://open.spotify.com/episode/6PcMtVXR58i7iu8kLH40Wd?si=feyu0LjESoiE479xHkaqSA )