A vector of your own distance measure can be used by specifying it as the input for distance option in matchit().