A Blackburn man has been jailed after attempted sexual communications with a child.